Exception: OsCtl::Lib::Exceptions::SystemCommandFailed
- Inherits:
-
StandardError
- Object
- StandardError
- OsCtl::Lib::Exceptions::SystemCommandFailed
- Defined in:
- lib/libosctl/exceptions.rb
Instance Attribute Summary collapse
-
#cmd ⇒ Object
readonly
Returns the value of attribute cmd.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#rc ⇒ Object
readonly
Returns the value of attribute rc.
Instance Method Summary collapse
-
#initialize(cmd, rc, output) ⇒ SystemCommandFailed
constructor
A new instance of SystemCommandFailed.
Constructor Details
#initialize(cmd, rc, output) ⇒ SystemCommandFailed
Returns a new instance of SystemCommandFailed.
6 7 8 9 10 11 12 |
# File 'lib/libosctl/exceptions.rb', line 6 def initialize(cmd, rc, output) @cmd = cmd @rc = rc @output = output super("command '#{cmd}' exited with code '#{rc}', output: '#{output}'") end |
Instance Attribute Details
#cmd ⇒ Object (readonly)
Returns the value of attribute cmd.
4 5 6 |
# File 'lib/libosctl/exceptions.rb', line 4 def cmd @cmd end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
4 5 6 |
# File 'lib/libosctl/exceptions.rb', line 4 def output @output end |
#rc ⇒ Object (readonly)
Returns the value of attribute rc.
4 5 6 |
# File 'lib/libosctl/exceptions.rb', line 4 def rc @rc end |