Module: Ramda::ExceptionHandler
- Defined in:
- lib/ramda/exception_handler.rb
Overview
Exception Handlers
Class Method Summary collapse
-
.default(e) ⇒ Object
This handler follows a standard behavior.
-
.with_narrow(e, method_name) ⇒ Object
This handler is useful for debug.
Class Method Details
.default(e) ⇒ Object
This handler follows a standard behavior.
18 19 20 |
# File 'lib/ramda/exception_handler.rb', line 18 def self.default(e, *) raise e, e.exception, e.backtrace end |
.with_narrow(e, method_name) ⇒ Object
This handler is useful for debug.
Output example: compose -> map -> add -> … original message … with backtrace: … original backtrace …
12 13 14 |
# File 'lib/ramda/exception_handler.rb', line 12 def self.with_narrow(e, method_name) raise e, [method_name, e.exception].join(' -> '), e.backtrace end |