Module: Subserver::ExceptionHandler
- Included in:
- Util
- Defined in:
- lib/subserver/exception_handler.rb
Defined Under Namespace
Classes: Logger
Instance Method Summary collapse
Instance Method Details
#handle_exception(ex, ctxHash = {}) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/subserver/exception_handler.rb', line 17 def handle_exception(ex, ctxHash={}) Subserver.error_handlers.each do |handler| begin handler.call(ex, ctxHash) rescue => ex Subserver.logger.error "!!! ERROR HANDLER THREW AN ERROR !!!" Subserver.logger.error ex Subserver.logger.error ex.backtrace.join("\n") unless ex.backtrace.nil? end end end |