Exception: EppErrorResponse

Inherits:
StandardError
  • Object
show all
Defined in:
lib/epp/exceptions.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ EppErrorResponse

Generic EPP exception. Accepts a response code and a message



5
6
7
8
9
# File 'lib/epp/exceptions.rb', line 5

def initialize(attributes = {})
  @response_xml = attributes[:xml]
  @response_code = attributes[:code]
  @message = attributes[:message]
end

Instance Attribute Details

#messageObject

Returns the value of attribute message.



2
3
4
# File 'lib/epp/exceptions.rb', line 2

def message
  @message
end

#response_codeObject

Returns the value of attribute response_code.



2
3
4
# File 'lib/epp/exceptions.rb', line 2

def response_code
  @response_code
end

#response_xmlObject

Returns the value of attribute response_xml.



2
3
4
# File 'lib/epp/exceptions.rb', line 2

def response_xml
  @response_xml
end

Instance Method Details

#to_sObject



11
12
13
# File 'lib/epp/exceptions.rb', line 11

def to_s
  "#{@message} (code #{@response_code})"
end