Exception: Chutzen::Command::ExecutionFailed
- Inherits:
-
StandardError
- Object
- StandardError
- StandardError
- Chutzen::Command::ExecutionFailed
- Defined in:
- lib/chutzen/command/execution_failed.rb
Overview
Raised when execution of a command fails.
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Instance of Command that triggered the error.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(message, command: nil) ⇒ ExecutionFailed
constructor
A new instance of ExecutionFailed.
Constructor Details
#initialize(message, command: nil) ⇒ ExecutionFailed
Returns a new instance of ExecutionFailed.
10 11 12 13 |
# File 'lib/chutzen/command/execution_failed.rb', line 10 def initialize(, command: nil) super() @command = command end |
Instance Attribute Details
#command ⇒ Object (readonly)
Instance of Command that triggered the error.
8 9 10 |
# File 'lib/chutzen/command/execution_failed.rb', line 8 def command @command end |
Instance Method Details
#as_json ⇒ Object
15 16 17 |
# File 'lib/chutzen/command/execution_failed.rb', line 15 def as_json { 'error' => details } end |