Exception: Zm::Client::SoapError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/zm/client/connector/soap_error.rb

Direct Known Subclasses

AuthError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(soapbody) ⇒ SoapError

Returns a new instance of SoapError.



11
12
13
14
15
16
17
18
19
# File 'lib/zm/client/connector/soap_error.rb', line 11

def initialize(soapbody)
  if soapbody.start_with?('{')
    init_from_json(soapbody)
  elsif soapbody.start_with?('<')
    init_from_xml(soapbody)
  end

  super "[#{@code}] [#{@reason}]"
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



9
10
11
# File 'lib/zm/client/connector/soap_error.rb', line 9

def code
  @code
end

#reasonObject (readonly)

Returns the value of attribute reason.



9
10
11
# File 'lib/zm/client/connector/soap_error.rb', line 9

def reason
  @reason
end