Exception: StrongKeyLite::SOAPError

Inherits:
ResponseError show all
Defined in:
lib/skles.rb

Overview

Raised when SOAP responses indicate errors.

Instance Attribute Summary collapse

Attributes inherited from ResponseError

#response

Instance Method Summary collapse

Constructor Details

#initialize(fault, response) ⇒ SOAPError

Returns a new instance of SOAPError.



167
168
169
170
171
172
# File 'lib/skles.rb', line 167

def initialize(fault, response)
  super
  if code_match = fault.to_s.match(/SKL-ERR-(\d+)/) then
    @code = code_match[1].try(:to_i)
  end
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



164
165
166
# File 'lib/skles.rb', line 164

def code
  @code
end