Exception: Sunshine::CmdError
- Defined in:
- lib/sunshine/exceptions.rb
Overview
An error occurred when attempting to run a command on the local system
Instance Attribute Summary collapse
-
#exit_code ⇒ Object
readonly
Returns the value of attribute exit_code.
Instance Method Summary collapse
-
#initialize(exit_code, cmd = nil) ⇒ CmdError
constructor
A new instance of CmdError.
Constructor Details
#initialize(exit_code, cmd = nil) ⇒ CmdError
Returns a new instance of CmdError.
23 24 25 26 27 |
# File 'lib/sunshine/exceptions.rb', line 23 def initialize exit_code, cmd=nil = "Execution failed with status #{exit_code}: #{cmd}" super @exit_code = exit_code end |
Instance Attribute Details
#exit_code ⇒ Object (readonly)
Returns the value of attribute exit_code.
21 22 23 |
# File 'lib/sunshine/exceptions.rb', line 21 def exit_code @exit_code end |