Exception: TezosClient::ScriptRuntimeError
- Inherits:
-
OperationFailure
- Object
- Exception
- OperationFailure
- TezosClient::ScriptRuntimeError
- Defined in:
- lib/tezos_client/exceptions.rb
Constant Summary
Constants included from Logger
Instance Attribute Summary collapse
-
#contract ⇒ Object
readonly
Returns the value of attribute contract.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#with ⇒ Object
readonly
Returns the value of attribute with.
Attributes inherited from OperationFailure
#errors, #message, #metadata, #status
Instance Method Summary collapse
-
#initialize(metadata:, errors:, status:) ⇒ ScriptRuntimeError
constructor
A new instance of ScriptRuntimeError.
Methods included from Logger
#log, #tezos_contents_log, #tezos_contents_log_filter
Constructor Details
#initialize(metadata:, errors:, status:) ⇒ ScriptRuntimeError
Returns a new instance of ScriptRuntimeError.
76 77 78 79 80 81 82 83 84 85 |
# File 'lib/tezos_client/exceptions.rb', line 76 def initialize(metadata:, errors:, status:) error = errors[0] rejection_error = errors.detect { |error| error[:id] == "proto.003-PsddFKi3.scriptRejectedRuntimeError" } @location = rejection_error[:location] @contract = error[:contractHandle] @with = rejection_error[:with] = "Script runtime Error when executing #{contract}: #{with} (location: #{location})" super end |
Instance Attribute Details
#contract ⇒ Object (readonly)
Returns the value of attribute contract.
74 75 76 |
# File 'lib/tezos_client/exceptions.rb', line 74 def contract @contract end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
72 73 74 |
# File 'lib/tezos_client/exceptions.rb', line 72 def location @location end |
#with ⇒ Object (readonly)
Returns the value of attribute with.
73 74 75 |
# File 'lib/tezos_client/exceptions.rb', line 73 def with @with end |