Exception: Libis::Services::SoapError
- Inherits:
-
Exception
- Object
- Exception
- Libis::Services::SoapError
- Defined in:
- lib/libis/services/soap_error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#detail ⇒ Object
Returns the value of attribute detail.
-
#name ⇒ Object
Returns the value of attribute name.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(error) ⇒ SoapError
constructor
A new instance of SoapError.
- #message ⇒ Object
Constructor Details
#initialize(error) ⇒ SoapError
Returns a new instance of SoapError.
9 10 11 12 13 14 |
# File 'lib/libis/services/soap_error.rb', line 9 def initialize(error) @code = error[:fault][:faultcode] rescue nil @text = error[:fault][:faultstring] rescue nil @detail = error[:fault][:detail] rescue nil @name = @detail.first.first rescue nil end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
7 8 9 |
# File 'lib/libis/services/soap_error.rb', line 7 def code @code end |
#detail ⇒ Object
Returns the value of attribute detail.
7 8 9 |
# File 'lib/libis/services/soap_error.rb', line 7 def detail @detail end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/libis/services/soap_error.rb', line 7 def name @name end |
#text ⇒ Object
Returns the value of attribute text.
7 8 9 |
# File 'lib/libis/services/soap_error.rb', line 7 def text @text end |
Instance Method Details
#message ⇒ Object
16 17 18 |
# File 'lib/libis/services/soap_error.rb', line 16 def "#{code}:#{name} #{text}" end |