Exception: Etherlite::NodeError

Inherits:
Error
  • Object
show all
Defined in:
lib/etherlite/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_error) ⇒ NodeError

Returns a new instance of NodeError.



17
18
19
20
21
# File 'lib/etherlite/errors.rb', line 17

def initialize(_error)
  super("#{_error['code']}: #{_error['message']}")
  @rpc_error_code =  _error['code']
  @rpc_error_message = _error['message']
end

Instance Attribute Details

#rpc_error_codeObject (readonly)

Returns the value of attribute rpc_error_code.



15
16
17
# File 'lib/etherlite/errors.rb', line 15

def rpc_error_code
  @rpc_error_code
end

#rpc_error_messageObject (readonly)

Returns the value of attribute rpc_error_message.



15
16
17
# File 'lib/etherlite/errors.rb', line 15

def rpc_error_message
  @rpc_error_message
end