Exception: Inforouter::Errors::SOAPError
- Inherits:
-
InforouterError
- Object
- StandardError
- InforouterError
- Inforouter::Errors::SOAPError
- Defined in:
- lib/inforouter/errors/soap_error.rb
Overview
This error is raised when a SOAP call fails.
Constant Summary
Constants inherited from InforouterError
Instance Attribute Summary collapse
-
#fault ⇒ Object
readonly
Original SOAP fault.
Instance Method Summary collapse
-
#initialize(e) ⇒ SOAPError
constructor
A new instance of SOAPError.
Methods inherited from InforouterError
Constructor Details
#initialize(e) ⇒ SOAPError
Returns a new instance of SOAPError.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/inforouter/errors/soap_error.rb', line 9 def initialize(e) @fault = e e.to_hash.tap do |fault| fault_code = fault[:fault][:faultcode] fault_string = parse_fault(fault[:fault][:faultstring]) super(('soap_error', message: fault_string, code: fault_code )) end end |
Instance Attribute Details
#fault ⇒ Object (readonly)
Original SOAP fault.
7 8 9 |
# File 'lib/inforouter/errors/soap_error.rb', line 7 def fault @fault end |