Exception: XMLRPC::FaultException
- Inherits:
-
StandardError
- Object
- StandardError
- XMLRPC::FaultException
- 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
-
#faultCode ⇒ Object
readonly
Returns the value of attribute faultCode.
-
#faultString ⇒ Object
readonly
Returns the value of attribute faultString.
Instance Method Summary collapse
-
#initialize(faultCode, faultString) ⇒ FaultException
constructor
Creates a new XMLRPC::FaultException instance.
-
#to_h ⇒ Object
The
faultCode
andfaultString
of the exception in a Hash.
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
#faultCode ⇒ Object (readonly)
Returns the value of attribute faultCode.
18 19 20 |
# File 'lib/xmlrpc/parser.rb', line 18 def faultCode @faultCode end |
#faultString ⇒ Object (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_h ⇒ Object
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 |