Exception: Unravel::Exec::Error::Silent
- Inherits:
-
Unravel::Exec::Error
- Object
- RuntimeError
- HumanInterventionNeeded
- Unravel::Exec::Error
- Unravel::Exec::Error::Silent
- Defined in:
- lib/unravel/exec.rb
Instance Attribute Summary collapse
-
#exitcode ⇒ Object
readonly
Returns the value of attribute exitcode.
-
#exitstatus ⇒ Object
readonly
Returns the value of attribute exitstatus.
Instance Method Summary collapse
-
#initialize(exitcode, stdout) ⇒ Silent
constructor
A new instance of Silent.
- #message ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(exitcode, stdout) ⇒ Silent
Returns a new instance of Silent.
10 11 12 13 14 |
# File 'lib/unravel/exec.rb', line 10 def initialize(exitcode, stdout) @exitcode = exitcode @stdout = stdout super() end |
Instance Attribute Details
#exitcode ⇒ Object (readonly)
Returns the value of attribute exitcode.
8 9 10 |
# File 'lib/unravel/exec.rb', line 8 def exitcode @exitcode end |
#exitstatus ⇒ Object (readonly)
Returns the value of attribute exitstatus.
9 10 11 |
# File 'lib/unravel/exec.rb', line 9 def exitstatus @exitstatus end |
Instance Method Details
#message ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/unravel/exec.rb', line 20 def lines = @stdout.lines.to_a output = if lines.size > 1 indent = "\n stdout" "#{indent}: #{lines * indent}\n" else "stdout: #{@stdout.inspect}" end "No stderr available: #{output} (exited with #{@exitcode})" end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/unravel/exec.rb', line 16 def to_s end |