Exception: JSONRPC::Error::ServerError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message) ⇒ ServerError

Returns a new instance of ServerError.



18
19
20
21
22
# File 'lib/jsonrpc/error.rb', line 18

def initialize(code, message)
  @code = code
  @response_error = message
  super("Server error #{code}: #{message}")
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



16
17
18
# File 'lib/jsonrpc/error.rb', line 16

def code
  @code
end

#response_errorObject (readonly)

Returns the value of attribute response_error.



16
17
18
# File 'lib/jsonrpc/error.rb', line 16

def response_error
  @response_error
end