Exception: Eth::Client::RpcError

Inherits:
IOError
  • Object
show all
Defined in:
lib/eth/client.rb

Overview

Raised when an RPC call returns an error. Carries the optional hex-encoded error data to support custom error decoding.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, data = nil) ⇒ RpcError

Constructor for the Eth::Client::RpcError class.

Parameters:

  • message (String)

    the error message returned by the RPC.

  • data (String) (defaults to: nil)

    optional hex encoded error data.



52
53
54
55
# File 'lib/eth/client.rb', line 52

def initialize(message, data = nil)
  super(message)
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



46
47
48
# File 'lib/eth/client.rb', line 46

def data
  @data
end