Class: CLI::Kit::ErrorHandler
- Inherits:
-
Object
- Object
- CLI::Kit::ErrorHandler
- Defined in:
- lib/cli/kit/error_handler.rb
Defined Under Namespace
Modules: NullExceptionReporter
Instance Method Summary collapse
- #call(&block) ⇒ Object
-
#initialize(log_file:, exception_reporter:) ⇒ ErrorHandler
constructor
A new instance of ErrorHandler.
Constructor Details
#initialize(log_file:, exception_reporter:) ⇒ ErrorHandler
Returns a new instance of ErrorHandler.
7 8 9 10 |
# File 'lib/cli/kit/error_handler.rb', line 7 def initialize(log_file:, exception_reporter:) @log_file = log_file @exception_reporter_or_proc = exception_reporter || NullExceptionReporter end |
Instance Method Details
#call(&block) ⇒ Object
18 19 20 21 |
# File 'lib/cli/kit/error_handler.rb', line 18 def call(&block) install! handle_abort(&block) end |