Exception: Distem::Lib::ShellError
- Inherits:
-
DistemError
- Object
- Exception
- DistemError
- Distem::Lib::ShellError
- Defined in:
- lib/distem/distemlib/errors.rb
Overview
An error occured during the execution of a shell command
Instance Attribute Summary (collapse)
-
- (Object) cmd
readonly
Returns the value of attribute cmd.
-
- (Object) err
readonly
Returns the value of attribute err.
-
- (Object) hostname
readonly
Returns the value of attribute hostname.
-
- (Object) ret
readonly
Returns the value of attribute ret.
Instance Method Summary (collapse)
-
- (ShellError) initialize(cmd, ret, err = "")
constructor
A new instance of ShellError.
- - (Object) to_s
Constructor Details
- (ShellError) initialize(cmd, ret, err = "")
Returns a new instance of ShellError
58 59 60 61 62 63 |
# File 'lib/distem/distemlib/errors.rb', line 58 def initialize(cmd, ret, err = "") @hostname = Socket.gethostname @cmd = cmd @ret = ret @err = err end |
Instance Attribute Details
- (Object) cmd (readonly)
Returns the value of attribute cmd
57 58 59 |
# File 'lib/distem/distemlib/errors.rb', line 57 def cmd @cmd end |
- (Object) err (readonly)
Returns the value of attribute err
57 58 59 |
# File 'lib/distem/distemlib/errors.rb', line 57 def err @err end |
- (Object) hostname (readonly)
Returns the value of attribute hostname
57 58 59 |
# File 'lib/distem/distemlib/errors.rb', line 57 def hostname @hostname end |
- (Object) ret (readonly)
Returns the value of attribute ret
57 58 59 |
# File 'lib/distem/distemlib/errors.rb', line 57 def ret @ret end |
Instance Method Details
- (Object) to_s
65 66 67 |
# File 'lib/distem/distemlib/errors.rb', line 65 def to_s return "cmd:'#{@cmd}' host:'#{@hostname}' result:'#{@ret}' err:'#{@err}'" end |