Exception: Cheetah::ExecutionFailed
- Inherits:
-
StandardError
- Object
- StandardError
- Cheetah::ExecutionFailed
- Defined in:
- lib/cheetah.rb
Overview
Exception raised when a command execution fails.
Instance Attribute Summary (collapse)
-
- (Array<Array<String>>) commands
readonly
The executed commands as an array where each item is again an array containing an executed command in the first element and its arguments in the remaining ones.
-
- (Process::Status) status
readonly
The executed command exit status.
-
- (String?) stderr
readonly
The output the executed command wrote to stderr; can be
nilif stderr was captured into a stream. -
- (String?) stdout
readonly
The output the executed command wrote to stdout; can be
nilif stdout was captured into a stream.
Instance Method Summary (collapse)
-
- (ExecutionFailed) initialize(commands, status, stdout, stderr, message = nil)
constructor
Initializes a new ExecutionFailed instance.
Constructor Details
- (ExecutionFailed) initialize(commands, status, stdout, stderr, message = nil)
Initializes a new Cheetah::ExecutionFailed instance.
68 69 70 71 72 73 74 |
# File 'lib/cheetah.rb', line 68 def initialize(commands, status, stdout, stderr, = nil) super() @commands = commands @status = status @stdout = stdout @stderr = stderr end |
Instance Attribute Details
- (Array<Array<String>>) commands (readonly)
The executed commands as an array where each item is again an array containing an executed command in the first element and its arguments in the remaining ones
46 47 48 |
# File 'lib/cheetah.rb', line 46 def commands @commands end |
- (Process::Status) status (readonly)
The executed command exit status
49 50 51 |
# File 'lib/cheetah.rb', line 49 def status @status end |
- (String?) stderr (readonly)
The output the executed command wrote to stderr; can
be nil if stderr was captured into a stream
57 58 59 |
# File 'lib/cheetah.rb', line 57 def stderr @stderr end |
- (String?) stdout (readonly)
The output the executed command wrote to stdout; can
be nil if stdout was captured into a stream
53 54 55 |
# File 'lib/cheetah.rb', line 53 def stdout @stdout end |