Exception: Quickl::InvalidOption
- Defined in:
- lib/quickl/errors.rb
Overview
This error can be raised to indicate that some command option was misused. This error is automatically raised on occurence of an OptionParser::ParseError when options are parsed.
Default exit code:
-1
Default reaction:
raise Help.new(code), , backtrace
Examples:
# Print message on $stderr and exit with -1
raise Quickl::InvalidOption, "--no-clue option does not exists"
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(*args) ⇒ InvalidOption
constructor
A new instance of InvalidOption.
- #react! ⇒ Object
Methods inherited from Error
#do_kernel_exit, #error_io, #exit?
Constructor Details
#initialize(*args) ⇒ InvalidOption
Returns a new instance of InvalidOption.
137 138 139 |
# File 'lib/quickl/errors.rb', line 137 def initialize(*args) super(*(args + [ -1 ])) end |