Exception: PWN::Blockchain::BTC::RPCError
- Inherits:
-
StandardError
- Object
- StandardError
- PWN::Blockchain::BTC::RPCError
- Defined in:
- lib/pwn/blockchain/btc.rb
Overview
Deliberately excludes remote messages/bodies, URLs and credentials.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
-
#rpc_method ⇒ Object
readonly
Returns the value of attribute rpc_method.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ RPCError
constructor
A new instance of RPCError.
Constructor Details
#initialize(opts = {}) ⇒ RPCError
Returns a new instance of RPCError.
18 19 20 21 22 23 |
# File 'lib/pwn/blockchain/btc.rb', line 18 def initialize(opts = {}) @code = opts[:code] @http_status = opts[:http_status] @rpc_method = opts[:rpc_method] super("Bitcoin RPC #{opts[:kind] || 'failed'} (method=#{@rpc_method}, code=#{@code}, HTTP=#{@http_status})") end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
16 17 18 |
# File 'lib/pwn/blockchain/btc.rb', line 16 def code @code end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
16 17 18 |
# File 'lib/pwn/blockchain/btc.rb', line 16 def http_status @http_status end |
#rpc_method ⇒ Object (readonly)
Returns the value of attribute rpc_method.
16 17 18 |
# File 'lib/pwn/blockchain/btc.rb', line 16 def rpc_method @rpc_method end |