Exception: SOAP::MultiService::ApiError
- Defined in:
- lib/soapex/error.rb
Overview
Raised if a call returns with a SOAP error
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#internal ⇒ Object
Returns the value of attribute internal.
-
#message ⇒ Object
Returns the value of attribute message.
-
#soap_faultcode ⇒ Object
Returns the value of attribute soap_faultcode.
-
#soap_faultstring ⇒ Object
Returns the value of attribute soap_faultstring.
-
#trigger ⇒ Object
Returns the value of attribute trigger.
-
#violations ⇒ Object
Returns the value of attribute violations.
Instance Method Summary collapse
-
#initialize(fault) ⇒ ApiError
constructor
A new instance of ApiError.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(fault) ⇒ ApiError
Returns a new instance of ApiError.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/soapex/error.rb', line 24 def initialize(fault) @soap_faultcode = getOrNil(fault, 'faultcode') @soap_faultstring = getOrNil(fault, 'faultstring') @code = getOrNil(fault.detail, 'code') @internal = getOrNil(fault.detail,'internal') @message = @soap_faultstring #getOrNil(fault.detail,'message') @message = getOrNil(fault.detail,'message') @trigger = getOrNil(fault.detail,'trigger') @violations = getOrNil(fault.detail,'violations') end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
18 19 20 |
# File 'lib/soapex/error.rb', line 18 def code @code end |
#internal ⇒ Object
Returns the value of attribute internal.
19 20 21 |
# File 'lib/soapex/error.rb', line 19 def internal @internal end |
#message ⇒ Object
Returns the value of attribute message.
20 21 22 |
# File 'lib/soapex/error.rb', line 20 def @message end |
#soap_faultcode ⇒ Object
Returns the value of attribute soap_faultcode.
16 17 18 |
# File 'lib/soapex/error.rb', line 16 def soap_faultcode @soap_faultcode end |
#soap_faultstring ⇒ Object
Returns the value of attribute soap_faultstring.
17 18 19 |
# File 'lib/soapex/error.rb', line 17 def soap_faultstring @soap_faultstring end |
#trigger ⇒ Object
Returns the value of attribute trigger.
21 22 23 |
# File 'lib/soapex/error.rb', line 21 def trigger @trigger end |
#violations ⇒ Object
Returns the value of attribute violations.
22 23 24 |
# File 'lib/soapex/error.rb', line 22 def violations @violations end |
Instance Method Details
#inspect ⇒ Object
35 36 37 |
# File 'lib/soapex/error.rb', line 35 def inspect "#<SOAP::MultiService::ApiError: \"#{@code || @soap_faultstring || @message}\">" end |
#to_s ⇒ Object
39 40 41 |
# File 'lib/soapex/error.rb', line 39 def to_s inspect end |