Exception: SOAP::MultiService::ApiError
- Defined in:
- lib/soapex/error.rb
Overview
Raised if a call returns with a SOAP error
Instance Method Summary collapse
-
#initialize(fault) ⇒ ApiError
constructor
A new instance of ApiError.
- #inspect ⇒ Object
- #message ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(fault) ⇒ ApiError
Returns a new instance of ApiError.
30 31 32 33 34 35 36 37 38 |
# File 'lib/soapex/error.rb', line 30 def initialize(fault) @soap_faultcode = getOrNil(fault, 'faultcode') @soap_faultstring = getOrNil(fault, 'faultstring') @code = getOrNil(fault.detail, 'code') @internal = getOrNil(fault.detail,'internal') @message = getOrNil(fault.detail,'message') @trigger = getOrNil(fault.detail,'trigger') @violations = getOrNil(fault.detail,'violations') end |
Instance Method Details
#inspect ⇒ Object
40 41 42 |
# File 'lib/soapex/error.rb', line 40 def inspect "#<SOAP::MultiService::ApiError: #{}>" end |
#message ⇒ Object
44 45 46 47 48 |
# File 'lib/soapex/error.rb', line 44 def Attrs.map{|a| [a, instance_variable_get(atsym(a))] }. select{|p| p[1] }. map{|p| "#{p[0]}: #{p[1].inspect}" }.join(', ') end |
#to_s ⇒ Object
50 51 52 |
# File 'lib/soapex/error.rb', line 50 def to_s end |