6 7 8
# File 'lib/charyf/utils/error_handler.rb', line 6 def<<(handler) handlers << handler end
10 11 12 13 14 15 16 17
# File 'lib/charyf/utils/error_handler.rb', line 10 def handle_exception(e) Charyf.logger.error "#{e.class}: #{e}".red Charyf.logger.error "\n\tBacktrace: #{e.backtrace.join("\n\t")}" handlers.map { |h| h.handle_exception(e) } e end