Exception: EppErrorResponse
- Inherits:
-
StandardError
- Object
- StandardError
- EppErrorResponse
- Includes:
- RequiresParameters
- Defined in:
- lib/epp/exceptions.rb
Overview
:nodoc:
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(attributes = {}) ⇒ EppErrorResponse
constructor
Generic EPP exception.
- #to_s ⇒ Object
Methods included from RequiresParameters
Constructor Details
#initialize(attributes = {}) ⇒ EppErrorResponse
Generic EPP exception. Accepts a response code and a message
7 8 9 10 11 12 13 |
# File 'lib/epp/exceptions.rb', line 7 def initialize(attributes = {}) requires!(attributes, :xml, :code, :message) @response_xml = attributes[:xml] @response_code = attributes[:code] @message = attributes[:message] end |
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
4 5 6 |
# File 'lib/epp/exceptions.rb', line 4 def @message end |
#response_code ⇒ Object
Returns the value of attribute response_code.
4 5 6 |
# File 'lib/epp/exceptions.rb', line 4 def response_code @response_code end |
#response_xml ⇒ Object
Returns the value of attribute response_xml.
4 5 6 |
# File 'lib/epp/exceptions.rb', line 4 def response_xml @response_xml end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/epp/exceptions.rb', line 15 def to_s "#{@message} (code #{@response_code})" end |