Exception: Quickl::NoSuchCommand

Inherits:
Error show all
Defined in:
lib/quickl/errors.rb

Overview

This error can be raised to indicate that a command has not been found (typically by delegators).

Default exit code:

-1

Default reaction:

raise Help.new(code), message, backtrace

Instance Attribute Summary

Attributes inherited from Error

#command, #exit_code

Instance Method Summary collapse

Methods inherited from Error

#do_kernel_exit, #error_io, #exit?

Constructor Details

#initialize(*args) ⇒ NoSuchCommand

Returns a new instance of NoSuchCommand.



186
187
188
# File 'lib/quickl/errors.rb', line 186

def initialize(*args)
  super(*(args + [ -1 ]))
end

Instance Method Details

#react!Object

Raises:



190
191
192
# File 'lib/quickl/errors.rb', line 190

def react!
  raise Help.new(self.exit_code), self.message, backtrace
end