Exception: Quickl::Help
Overview
This error can be raised to print command’s help and exit.
Default exit code:
0
Default reaction:
raise Exit.new(code), additional + "\n" + help, backtrace
Examples:
# Print command help on $stdout and exit with 0
raise Quickl::Help
# Print command help on $stderr and exit with -1
raise Quickl::Help.new(-1)
# Print additional message before help
raise Quickl::Help, "Hello user, below if the help!"
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(*args) ⇒ Help
constructor
A new instance of Help.
- #react! ⇒ Object
Methods inherited from Error
#do_kernel_exit, #error_io, #exit?
Constructor Details
#initialize(*args) ⇒ Help
Returns a new instance of Help.
104 105 106 |
# File 'lib/quickl/errors.rb', line 104 def initialize(*args) super(*(args + [ 0 ])) end |