Exception: Bozo::ExecutionError
- Inherits:
-
StandardError
- Object
- StandardError
- Bozo::ExecutionError
- Defined in:
- lib/bozo/execution_error.rb
Overview
Error raised when a command line executable does not return an exit code of zero.
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
The array of parameters that made up the call.
-
#exit_code ⇒ Object
readonly
The exit code returned by the command.
-
#tool ⇒ Object
readonly
The friendly name of the tool that failed.
Instance Method Summary collapse
-
#initialize(tool, command, exit_code) ⇒ ExecutionError
constructor
Create a new instance.
- #inspect ⇒ Object
Constructor Details
#initialize(tool, command, exit_code) ⇒ ExecutionError
Create a new instance.
24 25 26 27 28 |
# File 'lib/bozo/execution_error.rb', line 24 def initialize(tool, command, exit_code) @tool = tool @command = command @exit_code = exit_code end |
Instance Attribute Details
#command ⇒ Object (readonly)
The array of parameters that made up the call.
8 9 10 |
# File 'lib/bozo/execution_error.rb', line 8 def command @command end |
#exit_code ⇒ Object (readonly)
The exit code returned by the command.
11 12 13 |
# File 'lib/bozo/execution_error.rb', line 11 def exit_code @exit_code end |
#tool ⇒ Object (readonly)
The friendly name of the tool that failed.
14 15 16 |
# File 'lib/bozo/execution_error.rb', line 14 def tool @tool end |
Instance Method Details
#inspect ⇒ Object
30 31 32 |
# File 'lib/bozo/execution_error.rb', line 30 def inspect "Execution error: Exit code of #{exit_code} returned from: #{tool} #{command[1..-1].join(' ')}" end |