Exception: Quickl::InvalidArgument
- Defined in:
- lib/quickl/errors.rb
Overview
This error can be raised to indicate that some command argument was misused.
Default exit code:
-1
Default reaction:
raise Help.new(code), , backtrace
Examples:
# Print message on $stderr and exit with -1
raise Quickl::InvalidArgument, "Missing command argument"
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(*args) ⇒ InvalidArgument
constructor
A new instance of InvalidArgument.
- #react! ⇒ Object
Methods inherited from Error
#do_kernel_exit, #error_io, #exit?
Constructor Details
#initialize(*args) ⇒ InvalidArgument
Returns a new instance of InvalidArgument.
164 165 166 |
# File 'lib/quickl/errors.rb', line 164 def initialize(*args) super(*(args + [ -1 ])) end |
Instance Method Details
#react! ⇒ Object
168 169 170 |
# File 'lib/quickl/errors.rb', line 168 def react! raise Help.new(self.exit_code), self., backtrace end |