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-1.2.2 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-1.2.1 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-1.2.0 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb
sentry-raven-1.1.0 lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb