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.
92 93 94 95 96 97 98 |
# File 'lib/tetra/facades/process_runner.rb', line 92 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.
87 88 89 |
# File 'lib/tetra/facades/process_runner.rb', line 87 def commandline @commandline end |
#err ⇒ Object (readonly)
Returns the value of attribute err.
90 91 92 |
# File 'lib/tetra/facades/process_runner.rb', line 90 def err @err end |
#out ⇒ Object (readonly)
Returns the value of attribute out.
89 90 91 |
# File 'lib/tetra/facades/process_runner.rb', line 89 def out @out end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
88 89 90 |
# File 'lib/tetra/facades/process_runner.rb', line 88 def status @status end |
Instance Method Details
#to_s ⇒ Object
100 101 102 |
# File 'lib/tetra/facades/process_runner.rb', line 100 def to_s "\"#{@commandline}\" failed with status #{@status}\n#{out}\n#{err}" end |