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.
Instance Method Summary collapse
-
#initialize(cmd, error) ⇒ CmdException
constructor
A new instance of CmdException.
Constructor Details
#initialize(cmd, error) ⇒ CmdException
Returns a new instance of CmdException.
48 49 50 51 52 |
# File 'lib/pmdtester/cmd.rb', line 48 def initialize(cmd, error) @cmd = cmd @error = error @message = "#{COMMON_MSG} '#{cmd}'" end |
Instance Attribute Details
#cmd ⇒ Object (readonly)
Returns the value of attribute cmd.
42 43 44 |
# File 'lib/pmdtester/cmd.rb', line 42 def cmd @cmd end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
43 44 45 |
# File 'lib/pmdtester/cmd.rb', line 43 def error @error end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
44 45 46 |
# File 'lib/pmdtester/cmd.rb', line 44 def @message end |