class Barrister::RpcException

Represents a JSON-RPC error response. The Client proxy classes raise this exception if a response is received with an ‘error` slot.

See the [JSON-RPC 2.0 spec](jsonrpc.org/specification) for info on built in error codes. Your code can raise this exception with custom error codes. Use positive integers as codes to avoid collisions with the built in error codes.

Attributes

code[RW]
data[RW]
message[RW]

Public Class Methods

new(code, message, data=nil) click to toggle source
# File lib/barrister.rb, line 118
def initialize(code, message, data=nil)
  @code    = code
  @message = message
  @data    = data
end