Exception: ChannelAdvisor::Error

Inherits:
Exception
  • Object
show all
Defined in:
lib/channel_advisor/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, message_code)
  @response = response
  @message_code = message_code
  if @message_code && @response
    super("[#{message_code.code}]: #{message_code.message} - #{response.message}")
  end
end

Instance Attribute Details

#message_codeObject

Returns the value of attribute message_code.



3
4
5
# File 'lib/channel_advisor/errors.rb', line 3

def message_code
  @message_code
end

#responseObject

Returns the value of attribute response.



3
4
5
# File 'lib/channel_advisor/errors.rb', line 3

def response
  @response
end