method

fault

v1_9_3_392 - Show latest stable - Class: XMLRPC::Convert
fault(hash)
public

No documentation available.

# File lib/xmlrpc/parser.rb, line 144
    def self.fault(hash)
      if hash.kind_of? Hash and hash.size == 2 and
        hash.has_key? "faultCode" and hash.has_key? "faultString" and
        hash["faultCode"].kind_of? Integer and hash["faultString"].kind_of? String

        XMLRPC::FaultException.new(hash["faultCode"], hash["faultString"])
      else
        raise "wrong fault-structure: #{hash.inspect}"
      end
    end