Exception: PmdTester::CmdException

Inherits:
StandardError
  • Object
show all
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

Instance Method Summary collapse

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

#cmdObject (readonly)

Returns the value of attribute cmd.



42
43
44
# File 'lib/pmdtester/cmd.rb', line 42

def cmd
  @cmd
end

#errorObject (readonly)

Returns the value of attribute error.



43
44
45
# File 'lib/pmdtester/cmd.rb', line 43

def error
  @error
end

#messageObject (readonly)

Returns the value of attribute message.



44
45
46
# File 'lib/pmdtester/cmd.rb', line 44

def message
  @message
end