Module: Pliny::ErrorReporters

Extended by:
ErrorReporters
Included in:
ErrorReporters
Defined in:
lib/pliny/error_reporters.rb,
lib/pliny/error_reporters/sentry.rb,
lib/pliny/error_reporters/rollbar.rb

Defined Under Namespace

Classes: Rollbar, Sentry

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#error_reportersObject

Returns the value of attribute error_reporters.



8
9
10
# File 'lib/pliny/error_reporters.rb', line 8

def error_reporters
  @error_reporters
end

Instance Method Details

#notify(exception, context: {}, rack_env: {}) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/pliny/error_reporters.rb', line 10

def notify(exception, context: {}, rack_env: {})
  Pliny.log_exception(exception)

  error_reporters.each do |reporter|
    reporter.new.notify(exception, context: context, rack_env: rack_env)
  rescue
    Pliny.log_exception($!)
  end
end