Exception: Solana::Ruby::Kit::Rpc::RpcError
- Inherits:
-
StandardError
- Object
- StandardError
- Solana::Ruby::Kit::Rpc::RpcError
- Extended by:
- T::Sig
- Defined in:
- lib/solana/ruby/kit/rpc/transport.rb
Overview
JSON-RPC error returned by the Solana node.
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(code, message, data = nil) ⇒ RpcError
constructor
A new instance of RpcError.
Constructor Details
#initialize(code, message, data = nil) ⇒ RpcError
Returns a new instance of RpcError.
22 23 24 25 26 |
# File 'lib/solana/ruby/kit/rpc/transport.rb', line 22 def initialize(code, , data = nil) @code = T.let(code, Integer) @data = T.let(data, T.untyped) super("JSON-RPC error #{code}: #{message}") end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
16 17 18 |
# File 'lib/solana/ruby/kit/rpc/transport.rb', line 16 def code @code end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
19 20 21 |
# File 'lib/solana/ruby/kit/rpc/transport.rb', line 19 def data @data end |