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-1.6.2 lib/bugsnag/rails/active_record_rescue.rb