Exception: ChannelAdvisor::Error
- Inherits:
-
Exception
- Object
- Exception
- ChannelAdvisor::Error
- Defined in:
- lib/channel_advisor/errors.rb
Instance Attribute Summary collapse
-
#message_code ⇒ Object
Returns the value of attribute message_code.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response, message_code) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(response, message_code) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 10 11 |
# File 'lib/channel_advisor/errors.rb', line 5 def initialize(response, ) @response = response @message_code = if @message_code && @response super("[#{.code}]: #{.} - #{response.}") end end |
Instance Attribute Details
#message_code ⇒ Object
Returns the value of attribute message_code.
3 4 5 |
# File 'lib/channel_advisor/errors.rb', line 3 def @message_code end |
#response ⇒ Object
Returns the value of attribute response.
3 4 5 |
# File 'lib/channel_advisor/errors.rb', line 3 def response @response end |