Exception: GLI::CommandException
- Inherits:
-
BadCommandLine
- Object
- StandardError
- BadCommandLine
- GLI::CommandException
- Defined in:
- lib/gli/exceptions.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#command_in_context ⇒ Object
readonly
The command for which the argument was unknown.
Instance Method Summary collapse
- #exit_code ⇒ Object
-
#initialize(message, command_in_context, exit_code = nil) ⇒ CommandException
constructor
message
- the error message to show the user
command
-
the command we were using to parse command-specific options.
- the error message to show the user
Constructor Details
#initialize(message, command_in_context, exit_code = nil) ⇒ CommandException
message
-
the error message to show the user
command
-
the command we were using to parse command-specific options
51 52 53 54 55 |
# File 'lib/gli/exceptions.rb', line 51 def initialize(,command_in_context,exit_code=nil) super() @command_in_context = command_in_context @exit_code = exit_code end |
Instance Attribute Details
#command_in_context ⇒ Object (readonly)
The command for which the argument was unknown
48 49 50 |
# File 'lib/gli/exceptions.rb', line 48 def command_in_context @command_in_context end |
Instance Method Details
#exit_code ⇒ Object
57 58 59 |
# File 'lib/gli/exceptions.rb', line 57 def exit_code @exit_code || super end |