Exception: NumerousError

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

Overview

NumerousError

Exceptions indicate errors from the server

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, code, details) ⇒ NumerousError

initialize a NumerousError

Parameters:

  • msg

    StandardError message attribute



61
62
63
64
65
# File 'lib/numerousapp.rb', line 61

def initialize(msg, code, details)
    super(msg)
    @code = code
    @details = details
end

Instance Attribute Details

#codeObject

HTTP error code (e.g., 404)



61
62
63
64
65
# File 'lib/numerousapp.rb', line 61

def initialize(msg, code, details)
    super(msg)
    @code = code
    @details = details
end

#detailsObject

hash containing more ad-hoc information, most usefully :id which is the URL that was used in the request to the server



61
62
63
64
65
# File 'lib/numerousapp.rb', line 61

def initialize(msg, code, details)
    super(msg)
    @code = code
    @details = details
end