Sha256: 1d9a108f8e10fa6c295e821178deb9b55f65bde9cb81cd4711ff7a92ee1e579c

Contents?: true

Size: 974 Bytes

Versions: 44

Compression:

Stored size: 974 Bytes

Contents

module Raven
  class Rails
    module Overrides
      module DebugExceptionsCatcher
        def render_exception(env_or_request, exception)
          begin
            env = env_or_request.respond_to?(:env) ? env_or_request.env : env_or_request
            Raven::Rack.capture_exception(exception, env)
          rescue # rubocop:disable Lint/HandleExceptions
          end
          super
        end
      end

      module OldDebugExceptionsCatcher
        def self.included(base)
          base.send(:alias_method_chain, :render_exception, :raven)
        end

        def render_exception_with_raven(env_or_request, exception)
          begin
            env = env_or_request.respond_to?(:env) ? env_or_request.env : env_or_request
            Raven::Rack.capture_exception(exception, env)
          rescue # rubocop:disable Lint/HandleExceptions
          end
          render_exception_without_raven(env_or_request, exception)
        end
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 3 rubygems

Version Path
sentry-raven-3.0.0 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-2.13.0 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-2.12.3 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-2.12.2 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-2.12.1 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-2.12.0 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-2.11.3 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-2.11.2 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-2.11.1 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-2.11.0 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-2.10.0 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-2.9.0 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-2.8.0 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-2.7.4 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-2.7.3 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
jones-gem-2.7.2 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
alec-gem-2.7.2 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-2.7.2 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-2.7.1 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-2.6.3 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb