Class: Toys::CLI::DefaultErrorHandler
- Inherits:
-
Object
- Object
- Toys::CLI::DefaultErrorHandler
- Defined in:
- core-docs/toys/cli.rb
Overview
Defined in the toys-core gem
A basic error handler that prints out captured errors to a stream or a logger.
Instance Method Summary collapse
-
#call(error) ⇒ Integer
The error handler routine.
-
#initialize(output: $stderr) ⇒ DefaultErrorHandler
constructor
Create an error handler.
Constructor Details
#initialize(output: $stderr) ⇒ DefaultErrorHandler
Create an error handler.
397 398 399 |
# File 'core-docs/toys/cli.rb', line 397 def initialize(output: $stderr) # Source available in the toys-core gem end |
Instance Method Details
#call(error) ⇒ Integer
The error handler routine. Prints out the error message and backtrace, and returns the correct result code.
408 409 410 |
# File 'core-docs/toys/cli.rb', line 408 def call(error) # Source available in the toys-core gem end |