Exception: CommandError
- Inherits:
-
StandardError
- Object
- StandardError
- CommandError
- Defined in:
- lib/tungsten/common.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#rc ⇒ Object
readonly
Returns the value of attribute rc.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #build_message ⇒ Object
-
#initialize(command, rc, result, errors = "") ⇒ CommandError
constructor
A new instance of CommandError.
Constructor Details
#initialize(command, rc, result, errors = "") ⇒ CommandError
27 28 29 30 31 32 33 34 |
# File 'lib/tungsten/common.rb', line 27 def initialize(command, rc, result, errors="") @command = command @rc = rc @result = result @errors = errors super(()) end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
25 26 27 |
# File 'lib/tungsten/common.rb', line 25 def command @command end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
25 26 27 |
# File 'lib/tungsten/common.rb', line 25 def errors @errors end |
#rc ⇒ Object (readonly)
Returns the value of attribute rc.
25 26 27 |
# File 'lib/tungsten/common.rb', line 25 def rc @rc end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
25 26 27 |
# File 'lib/tungsten/common.rb', line 25 def result @result end |
Instance Method Details
#build_message ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/tungsten/common.rb', line 36 def if @errors == "" errors = "No STDERR" else errors = "Errors: #{@errors}" end "Failed: #{command}, RC: #{rc}, Result: #{result}, #{errors}" end |