Module: PikaQue::Reporters

Included in:
Subscriber
Defined in:
lib/pika_que/reporters.rb,
lib/pika_que/reporters/log_reporter.rb

Defined Under Namespace

Classes: LogReporter

Instance Method Summary collapse

Instance Method Details

#notify_reporters(ex, clazz, msg) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/pika_que/reporters.rb', line 4

def notify_reporters(ex, clazz, msg)
  PikaQue.reporters.each do |reporter|
    begin
      reporter.report(ex, clazz, msg)
    rescue => e
      PikaQue.logger.error "error reporting by #{reporter.class}"
      PikaQue.logger.error e
      PikaQue.logger.error e.backtrace.join("\n") unless e.backtrace.nil?
    end
    
  end
end