Exception: PmdTester::CmdException
- Inherits:
-
StandardError
- Object
- StandardError
- PmdTester::CmdException
- Defined in:
- lib/pmdtester/cmd.rb
Overview
The exception should be raised when the shell command failed.
Constant Summary collapse
- COMMON_MSG =
'An error occurred while executing the shell command'
Instance Attribute Summary collapse
-
#cmd ⇒ Object
readonly
Returns the value of attribute cmd.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize(cmd, stdout, error, status) ⇒ CmdException
constructor
A new instance of CmdException.
Constructor Details
#initialize(cmd, stdout, error, status) ⇒ CmdException
Returns a new instance of CmdException.
75 76 77 78 79 80 81 |
# File 'lib/pmdtester/cmd.rb', line 75 def initialize(cmd, stdout, error, status) @cmd = cmd @stdout = stdout @error = error @status = status @message = "#{COMMON_MSG} '#{cmd}' #{status}" end |
Instance Attribute Details
#cmd ⇒ Object (readonly)
Returns the value of attribute cmd.
67 68 69 |
# File 'lib/pmdtester/cmd.rb', line 67 def cmd @cmd end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
69 70 71 |
# File 'lib/pmdtester/cmd.rb', line 69 def error @error end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
71 72 73 |
# File 'lib/pmdtester/cmd.rb', line 71 def @message end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
70 71 72 |
# File 'lib/pmdtester/cmd.rb', line 70 def status @status end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
68 69 70 |
# File 'lib/pmdtester/cmd.rb', line 68 def stdout @stdout end |