module Sneakers::ErrorReporter

Public Instance Methods

worker_error(exception, context_hash = {}) click to toggle source
# File lib/sneakers/error_reporter.rb, line 15
def worker_error(exception, context_hash = {})
  Sneakers.error_reporters.each do |handler|
    begin
      handler.call(exception, self, context_hash)
    rescue => inner_exception
      Sneakers.logger.error '!!! ERROR REPORTER THREW AN ERROR !!!'
      Sneakers.logger.error inner_exception
      Sneakers.logger.error inner_exception.backtrace.join("\n") unless inner_exception.backtrace.nil?
    end
  end
end