Class: Rollbar::ErrorSubscriber

Inherits:
Object
  • Object
show all
Defined in:
lib/rollbar/plugins/rails/error_subscriber.rb

Instance Method Summary collapse

Instance Method Details

#report(error, handled:, severity:, context:, source: nil) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/rollbar/plugins/rails/error_subscriber.rb', line 3

def report(error, handled:, severity:, context:, source: nil)
  # The default `nil` for capture_uncaught means `true`. so check for false.
  return unless handled || Rollbar.configuration.capture_uncaught != false

  extra = context.is_a?(Hash) ? context.deep_dup : {}
  extra[:custom_data_method_context] = source
  Rollbar.log(severity, error, extra)
end