Exception: Esgob::ServerError

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

Overview

Exception raised when the Esgob API returns an error

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code = nil) ⇒ ServerError

Returns a new instance of ServerError.



12
13
14
15
# File 'lib/esgob.rb', line 12

def initialize(message, code = nil)
  super message
  @code = code
end

Instance Attribute Details

#codeObject (readonly)

Get the error code number returned by Esgob



10
11
12
# File 'lib/esgob.rb', line 10

def code
  @code
end