Exception: Cocov::PluginKit::Exec::ExecutionError
- Inherits:
-
StandardError
- Object
- StandardError
- Cocov::PluginKit::Exec::ExecutionError
- Defined in:
- lib/cocov/plugin_kit/exec.rb
Overview
ExecutionError is thrown when an #exec or #exec2 procedure fails. It includes the captured stdout and stderr streams, along with the exit status, the original command and its environment.
Instance Attribute Summary collapse
-
#cmd ⇒ Object
readonly
Returns the value of attribute cmd.
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize(status, stdout, stderr, cmd, env) ⇒ ExecutionError
constructor
Internal: Initializes a new ExecutionError instance.
Constructor Details
#initialize(status, stdout, stderr, cmd, env) ⇒ ExecutionError
Internal: Initializes a new ExecutionError instance
14 15 16 17 18 19 20 21 |
# File 'lib/cocov/plugin_kit/exec.rb', line 14 def initialize(status, stdout, stderr, cmd, env) super("Process #{cmd.split.first} exited with status #{status}: #{stdout}\n#{stderr}") @status = status @stdout = stdout @stderr = stderr @cmd = cmd @env = env end |
Instance Attribute Details
#cmd ⇒ Object (readonly)
Returns the value of attribute cmd.
11 12 13 |
# File 'lib/cocov/plugin_kit/exec.rb', line 11 def cmd @cmd end |
#env ⇒ Object (readonly)
Returns the value of attribute env.
11 12 13 |
# File 'lib/cocov/plugin_kit/exec.rb', line 11 def env @env end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
11 12 13 |
# File 'lib/cocov/plugin_kit/exec.rb', line 11 def status @status end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
11 12 13 |
# File 'lib/cocov/plugin_kit/exec.rb', line 11 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
11 12 13 |
# File 'lib/cocov/plugin_kit/exec.rb', line 11 def stdout @stdout end |