Module: AnyCable::ExceptionsHandling
- Defined in:
- lib/anycable/exceptions_handling.rb
Overview
:nodoc:
Class Method Summary collapse
Class Method Details
.add_handler(block) ⇒ Object Also known as: <<
6 7 8 |
# File 'lib/anycable/exceptions_handling.rb', line 6 def add_handler(block) handlers << procify(block) end |
.notify(exp, method_name, message) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/anycable/exceptions_handling.rb', line 12 def notify(exp, method_name, ) handlers.each do |handler| handler.call(exp, method_name, ) rescue => exp AnyCable.logger.error "!!! EXCEPTION HANDLER THREW AN ERROR !!!" AnyCable.logger.error exp AnyCable.logger.error exp.backtrace.join("\n") unless exp.backtrace.nil? end end |