Exception: RpcError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/calimero/types/rpc.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, jsonrpc, code, error_info) ⇒ RpcError

Returns a new instance of RpcError.



9
10
11
12
13
14
15
# File 'lib/calimero/types/rpc.rb', line 9

def initialize(id, jsonrpc, code, error_info)
  @id = id
  @jsonrpc = jsonrpc
  @code = code
  @error_info = error_info
  super(error_info[:message])
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



7
8
9
# File 'lib/calimero/types/rpc.rb', line 7

def code
  @code
end

#error_infoObject (readonly)

Returns the value of attribute error_info.



7
8
9
# File 'lib/calimero/types/rpc.rb', line 7

def error_info
  @error_info
end

#idObject (readonly)

Returns the value of attribute id.



7
8
9
# File 'lib/calimero/types/rpc.rb', line 7

def id
  @id
end

#jsonrpcObject (readonly)

Returns the value of attribute jsonrpc.



7
8
9
# File 'lib/calimero/types/rpc.rb', line 7

def jsonrpc
  @jsonrpc
end