Exception: Tetra::ExecutionFailed
- Inherits:
-
StandardError
- Object
- StandardError
- Tetra::ExecutionFailed
- Defined in:
- lib/tetra/facades/process_runner.rb
Overview
raised when a command returns a non-zero status
Instance Attribute Summary collapse
-
#commandline ⇒ Object
readonly
Returns the value of attribute commandline.
-
#err ⇒ Object
readonly
Returns the value of attribute err.
-
#out ⇒ Object
readonly
Returns the value of attribute out.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(commandline, status, out, err) ⇒ ExecutionFailed
constructor
A new instance of ExecutionFailed.
- #to_s ⇒ Object
Constructor Details
#initialize(commandline, status, out, err) ⇒ ExecutionFailed
Returns a new instance of ExecutionFailed.
88 89 90 91 92 93 94 |
# File 'lib/tetra/facades/process_runner.rb', line 88 def initialize(commandline, status, out, err) @commandline = commandline @status = status @out = out @err = err super("Command failed: #{commandline} (status: #{status})") end |
Instance Attribute Details
#commandline ⇒ Object (readonly)
Returns the value of attribute commandline.
86 87 88 |
# File 'lib/tetra/facades/process_runner.rb', line 86 def commandline @commandline end |
#err ⇒ Object (readonly)
Returns the value of attribute err.
86 87 88 |
# File 'lib/tetra/facades/process_runner.rb', line 86 def err @err end |
#out ⇒ Object (readonly)
Returns the value of attribute out.
86 87 88 |
# File 'lib/tetra/facades/process_runner.rb', line 86 def out @out end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
86 87 88 |
# File 'lib/tetra/facades/process_runner.rb', line 86 def status @status end |
Instance Method Details
#to_s ⇒ Object
96 97 98 |
# File 'lib/tetra/facades/process_runner.rb', line 96 def to_s "\"#{@commandline}\" failed with status #{@status}\n#{out}\n#{err}" end |