Exception: ProcessExecuter::CommandError
- Defined in:
- lib/process_executer/errors.rb
Overview
Raised when a command fails or exits because of an uncaught signal
The command executed, status, stdout, and stderr are available from this object.
The Gem will raise a more specific error for each type of failure:
- FailedError: when the command exits with a non-zero status
- SignaledError: when the command exits because of an uncaught signal
- TimeoutError: when the command times out
Direct Known Subclasses
Instance Attribute Summary collapse
-
#result ⇒ Result
readonly
The result of the command including the command, its status and its output.
Instance Method Summary collapse
-
#error_message ⇒ String
The human readable representation of this error.
-
#initialize(result) ⇒ CommandError
constructor
Create a CommandError object.
Constructor Details
permalink #initialize(result) ⇒ CommandError
Create a CommandError object
78 79 80 81 |
# File 'lib/process_executer/errors.rb', line 78 def initialize(result) @result = result super() end |
Instance Attribute Details
Instance Method Details
permalink #error_message ⇒ String
The human readable representation of this error
90 91 92 |
# File 'lib/process_executer/errors.rb', line 90 def "#{result.command}, status: #{result}, stderr: #{result.stderr.inspect}" end |