Sha256: a47080ebb976869471bac172cef41355592e0128d9fe1feebb7335923c79b71b

Contents?: true

Size: 457 Bytes

Versions: 21

Compression:

Stored size: 457 Bytes

Contents

module Bugsnag::Rails
  module ActiveRecordRescue
    def run_callbacks(kind, *args, &block)
      if %w(commit rollback).include?(kind.to_s)
        begin
          super
        rescue StandardError => exception
          # This exception will NOT be escalated, so notify it here.
          Bugsnag.auto_notify(exception)
          raise
        end
      else
        # Let the post process handle the exception
        super
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
bugsnag-2.2.1 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-2.2.0 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-2.1.0 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-2.0.3 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-2.0.2 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-2.0.1 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-2.0.0 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-1.8.8 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-1.8.7 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-1.8.6 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-1.8.5 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-1.8.4 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-1.8.3 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-1.8.2 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-1.8.1 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-1.8.0 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-1.7.0 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-1.6.5 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-1.6.4 lib/bugsnag/rails/active_record_rescue.rb
bugsnag-1.6.3 lib/bugsnag/rails/active_record_rescue.rb