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
# File 'lib/zm/client/connector/soap_error.rb', line 11

def initialize(soapbody)
  @reason = soapbody[:Body][:Fault][:Reason][:Text]
  @code = soapbody[:Body][:Fault][:Detail][:Error][:Code]
  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