Exception: Eth::Client::RpcError
- Inherits:
-
IOError
- Object
- IOError
- Eth::Client::RpcError
- Defined in:
- lib/eth/client.rb
Overview
Raised when an RPC call returns an error. Carries the error code and the optional hex-encoded error data to support custom error decoding.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(message, data = nil, code = nil) ⇒ RpcError
constructor
Constructor for the RpcError class.
Constructor Details
#initialize(message, data = nil, code = nil) ⇒ RpcError
Constructor for the Eth::Client::RpcError class.
54 55 56 57 58 |
# File 'lib/eth/client.rb', line 54 def initialize(, data = nil, code = nil) super() @data = data @code = code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
47 48 49 |
# File 'lib/eth/client.rb', line 47 def code @code end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
46 47 48 |
# File 'lib/eth/client.rb', line 46 def data @data end |