Exception: EPPClient::EPPErrorResponse
- Inherits:
-
StandardError
- Object
- StandardError
- EPPClient::EPPErrorResponse
- Defined in:
- lib/epp-client/exceptions.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#response_code ⇒ Object
Returns the value of attribute response_code.
-
#response_xml ⇒ Object
Returns the value of attribute response_xml.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ EPPErrorResponse
constructor
An exception with an added field so that it can store the xml response that generated it.
-
#inspect ⇒ Object
:nodoc:.
-
#to_s ⇒ Object
:nodoc:.
Constructor Details
#initialize(attrs = {}) ⇒ EPPErrorResponse
An exception with an added field so that it can store the xml response that generated it.
7 8 9 10 11 |
# File 'lib/epp-client/exceptions.rb', line 7 def initialize(attrs = {}) @response_xml = attrs[:xml] @response_code = attrs[:code] @message = attrs[:message] end |
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
3 4 5 |
# File 'lib/epp-client/exceptions.rb', line 3 def @message end |
#response_code ⇒ Object
Returns the value of attribute response_code.
3 4 5 |
# File 'lib/epp-client/exceptions.rb', line 3 def response_code @response_code end |
#response_xml ⇒ Object
Returns the value of attribute response_xml.
3 4 5 |
# File 'lib/epp-client/exceptions.rb', line 3 def response_xml @response_xml end |
Instance Method Details
#inspect ⇒ Object
:nodoc:
17 18 19 |
# File 'lib/epp-client/exceptions.rb', line 17 def inspect #:nodoc: "#<#{self.class}: code: #{@response_code}, message: #{@message.inspect}, xml: #{@response_xml}>" end |
#to_s ⇒ Object
:nodoc:
13 14 15 |
# File 'lib/epp-client/exceptions.rb', line 13 def to_s #:nodoc: "#{@message} (code #{@response_code})" end |