Exception: Climate::CommandError
- Defined in:
- lib/climate/errors.rb
Overview
Raised by an instance of a Command when something went wrong during execution
Direct Known Subclasses
ExitException, HelpNeeded, MissingArgumentError, UnexpectedArgumentError, UnknownCommandError
Instance Attribute Summary collapse
-
#command_class ⇒ Object
The command that raised the error.
Instance Method Summary collapse
-
#initialize(msg = nil, command_or_class = nil) ⇒ CommandError
constructor
A new instance of CommandError.
Constructor Details
#initialize(msg = nil, command_or_class = nil) ⇒ CommandError
Returns a new instance of CommandError.
14 15 16 17 18 |
# File 'lib/climate/errors.rb', line 14 def initialize(msg=nil, command_or_class=nil) @command_class = command_or_class.is_a?(Command) ? command_or_class.class : command_or_class super(msg) end |
Instance Attribute Details
#command_class ⇒ Object
The command that raised the error
12 13 14 |
# File 'lib/climate/errors.rb', line 12 def command_class @command_class end |