Exception: XMLRPC::FaultException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/xmlrpc/parser.rb

Overview

Raised when the remote procedure returns a fault-structure, which has two accessor-methods faultCode an Integer, and faultString a String.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(faultCode, faultString) ⇒ FaultException

Creates a new XMLRPC::FaultException instance.

faultString is passed to StandardError as the msg of the Exception.



23
24
25
26
27
# File 'lib/xmlrpc/parser.rb', line 23

def initialize(faultCode, faultString)
  @faultCode   = faultCode
  @faultString = faultString
  super(@faultString)
end

Instance Attribute Details

#faultCodeObject (readonly)

Returns the value of attribute faultCode.



18
19
20
# File 'lib/xmlrpc/parser.rb', line 18

def faultCode
  @faultCode
end

#faultStringObject (readonly)

Returns the value of attribute faultString.



18
19
20
# File 'lib/xmlrpc/parser.rb', line 18

def faultString
  @faultString
end

Instance Method Details

#to_hObject

The faultCode and faultString of the exception in a Hash.



30
31
32
# File 'lib/xmlrpc/parser.rb', line 30

def to_h
  {"faultCode" => @faultCode, "faultString" => @faultString}
end