Exception: RemoteCommandError
- Inherits:
-
CommandError
- Object
- StandardError
- CommandError
- RemoteCommandError
- Defined in:
- lib/tungsten/common.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Attributes inherited from CommandError
#command, #errors, #rc, #result
Instance Method Summary collapse
- #build_message ⇒ Object
-
#initialize(user, host, command, rc, result, errors = "") ⇒ RemoteCommandError
constructor
A new instance of RemoteCommandError.
Constructor Details
#initialize(user, host, command, rc, result, errors = "") ⇒ RemoteCommandError
Returns a new instance of RemoteCommandError.
50 51 52 53 54 |
# File 'lib/tungsten/common.rb', line 50 def initialize(user, host, command, rc, result, errors = "") @user = user @host = host super(command, rc, result, errors) end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
48 49 50 |
# File 'lib/tungsten/common.rb', line 48 def host @host end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
48 49 50 |
# File 'lib/tungsten/common.rb', line 48 def user @user end |
Instance Method Details
#build_message ⇒ Object
56 57 58 59 60 61 62 63 64 |
# File 'lib/tungsten/common.rb', line 56 def if @errors == "" errors = "No STDERR" else errors = "Errors: #{errors}" end "Failed: #{command}, RC: #{rc}, Result: #{result}, #{errors}" end |