module Roundhouse::ExceptionHandler

Public Instance Methods

handle_exception(ex, ctxHash={}) click to toggle source
# File lib/roundhouse/exception_handler.rb, line 17
def handle_exception(ex, ctxHash={})
  Roundhouse.error_handlers.each do |handler|
    begin
      handler.call(ex, ctxHash)
    rescue => ex
      Roundhouse.logger.error "!!! ERROR HANDLER THREW AN ERROR !!!"
      Roundhouse.logger.error ex
      Roundhouse.logger.error ex.backtrace.join("\n") unless ex.backtrace.nil?
    end
  end
end