Exception: StatesLanguageMachine::ExecutionError
- Defined in:
- lib/ruby_slm/errors.rb
Instance Attribute Summary collapse
-
#cause ⇒ String
readonly
The cause of the error.
-
#state_name ⇒ String
readonly
The name of the state where the error occurred.
Instance Method Summary collapse
-
#initialize(state_name, cause) ⇒ ExecutionError
constructor
A new instance of ExecutionError.
Constructor Details
#initialize(state_name, cause) ⇒ ExecutionError
Returns a new instance of ExecutionError.
14 15 16 17 18 |
# File 'lib/ruby_slm/errors.rb', line 14 def initialize(state_name, cause) @state_name = state_name @cause = cause super("Execution failed in state '#{state_name}': #{cause}") end |
Instance Attribute Details
#cause ⇒ String (readonly)
Returns the cause of the error.
10 11 12 |
# File 'lib/ruby_slm/errors.rb', line 10 def cause @cause end |
#state_name ⇒ String (readonly)
Returns the name of the state where the error occurred.
8 9 10 |
# File 'lib/ruby_slm/errors.rb', line 8 def state_name @state_name end |