Exception: ProcessWatcher::NonzeroExitCode
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- ProcessWatcher::NonzeroExitCode
- Defined in:
- lib/process_watcher.rb
Overview
Raised when a subprocess completed, but with a nonzero exit code.
Instance Attribute Summary collapse
-
#exit_code ⇒ Object
readonly
(Fixnum) exit code returned by the subprocess.
-
#output ⇒ Object
readonly
(String) process output (hopefully explaining the situation).
Instance Method Summary collapse
-
#initialize(exit_code, output) ⇒ NonzeroExitCode
constructor
A new instance of NonzeroExitCode.
-
#to_s ⇒ Object
Describe the error.
Constructor Details
#initialize(exit_code, output) ⇒ NonzeroExitCode
Returns a new instance of NonzeroExitCode.
50 51 52 53 |
# File 'lib/process_watcher.rb', line 50 def initialize(exit_code, output) @exit_code = exit_code @output = output end |
Instance Attribute Details
#exit_code ⇒ Object (readonly)
(Fixnum) exit code returned by the subprocess
46 47 48 |
# File 'lib/process_watcher.rb', line 46 def exit_code @exit_code end |
#output ⇒ Object (readonly)
(String) process output (hopefully explaining the situation)
48 49 50 |
# File 'lib/process_watcher.rb', line 48 def output @output end |
Instance Method Details
#to_s ⇒ Object
Describe the error.
56 57 58 |
# File 'lib/process_watcher.rb', line 56 def to_s "Exit code nonzero: #{@exit_code}\nOutput was #{@output}" end |