Exception: Solace::ZarTrustlessEscrow::Errors::ProgramError
- Inherits:
-
Solace::ZarTrustlessEscrow::Error
- Object
- StandardError
- Solace::ZarTrustlessEscrow::Error
- Solace::ZarTrustlessEscrow::Errors::ProgramError
- Defined in:
- lib/solace/zar_trustless_escrow/errors/program_error.rb
Overview
A resolved on-chain TrustlessEscrowError, carrying its custom error code, variant name, and message. Returned by #from_code and #from_name so callers can translate a failed transaction’s custom error code into a meaningful, rescuable Ruby error.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#error_name ⇒ Object
readonly
Returns the value of attribute error_name.
Instance Method Summary collapse
-
#initialize(code:, error_name:, message:) ⇒ ProgramError
constructor
A new instance of ProgramError.
Constructor Details
#initialize(code:, error_name:, message:) ⇒ ProgramError
Returns a new instance of ProgramError.
22 23 24 25 26 |
# File 'lib/solace/zar_trustless_escrow/errors/program_error.rb', line 22 def initialize(code:, error_name:, message:) @code = code @error_name = error_name super() end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
13 14 15 |
# File 'lib/solace/zar_trustless_escrow/errors/program_error.rb', line 13 def code @code end |
#error_name ⇒ Object (readonly)
Returns the value of attribute error_name.
17 18 19 |
# File 'lib/solace/zar_trustless_escrow/errors/program_error.rb', line 17 def error_name @error_name end |