Module: XMLRPC::Convert

Defined in:
lib/action_kit_api/connection.rb

Class Method Summary collapse

Class Method Details

.fault(hash) ⇒ Object



22
23
24
25
26
27
28
29
30
# File 'lib/action_kit_api/connection.rb', line 22

def self.fault(hash)
  if hash.kind_of? Hash and hash.size == 2 and
    hash.has_key? "faultCode" and hash.has_key? "faultString"

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