Exception: BSV::Wallet::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/bsv/wallet/errors.rb

Overview

Base error for all wallet operations. Carries a machine-readable code per the BRC-100 error structure.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code = 1) ⇒ Error

Returns a new instance of Error.



10
11
12
13
# File 'lib/bsv/wallet/errors.rb', line 10

def initialize(message, code = 1)
  @code = code
  super(message)
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



8
9
10
# File 'lib/bsv/wallet/errors.rb', line 8

def code
  @code
end