Sha256: f04297b0ec3a9f4193e8aaec6a90fb57abbaa538a19051df2a249692eb45c82b

Contents?: true

Size: 1.02 KB

Versions: 13

Compression:

Stored size: 1.02 KB

Contents

module Bugsnag
  module Rails
    module ActionControllerRescue
      def self.included(base)
        base.send(:alias_method, :rescue_action_in_public_without_bugsnag, :rescue_action_in_public)
        base.send(:alias_method, :rescue_action_in_public, :rescue_action_in_public_with_bugsnag)

        base.send(:alias_method, :rescue_action_locally_without_bugsnag, :rescue_action_locally)
        base.send(:alias_method, :rescue_action_locally, :rescue_action_locally_with_bugsnag)
      end

      private
      def rescue_action_in_public_with_bugsnag(exception)
        # bugsnag_request_data is defined in controller_methods.rb
        Bugsnag.auto_notify(exception, bugsnag_request_data)
        rescue_action_in_public_without_bugsnag(exception)
      end
      
      def rescue_action_locally_with_bugsnag(exception)
        # bugsnag_request_data is defined in controller_methods.rb
        Bugsnag.auto_notify(exception, bugsnag_request_data)
        rescue_action_locally_without_bugsnag(exception)
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
bugsnag-1.1.5 lib/bugsnag/rails/action_controller_rescue.rb
bugsnag-1.1.4 lib/bugsnag/rails/action_controller_rescue.rb
bugsnag-1.1.3 lib/bugsnag/rails/action_controller_rescue.rb
bugsnag-1.1.2 lib/bugsnag/rails/action_controller_rescue.rb
bugsnag-1.1.1 lib/bugsnag/rails/action_controller_rescue.rb
bugsnag-1.1.0 lib/bugsnag/rails/action_controller_rescue.rb
bugsnag-1.0.10 lib/bugsnag/rails/action_controller_rescue.rb
bugsnag-1.0.9 lib/bugsnag/rails/action_controller_rescue.rb
bugsnag-1.0.8 lib/bugsnag/rails/action_controller_rescue.rb
bugsnag-1.0.7 lib/bugsnag/rails/action_controller_rescue.rb
bugsnag-1.0.6 lib/bugsnag/rails/action_controller_rescue.rb
bugsnag-1.0.5 lib/bugsnag/rails/action_controller_rescue.rb
bugsnag-1.0.4 lib/bugsnag/rails/action_controller_rescue.rb