Exception: MmJsonClient::ServerError

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

Overview

The server responded with an error.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message) ⇒ ServerError

Returns a new instance of ServerError.



7
8
9
10
# File 'lib/mm_json_client/exceptions.rb', line 7

def initialize(code, message)
  @code = code.to_i
  @message = message
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



4
5
6
# File 'lib/mm_json_client/exceptions.rb', line 4

def code
  @code
end

#messageObject (readonly)

Returns the value of attribute message.



5
6
7
# File 'lib/mm_json_client/exceptions.rb', line 5

def message
  @message
end

Instance Method Details

#to_sObject



16
17
18
# File 'lib/mm_json_client/exceptions.rb', line 16

def to_s
  message
end