Module: Raven::Rails::Overrides::OldDebugExceptionsCatcher

Defined in:
lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


16
17
18
# File 'lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb', line 16

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

Instance Method Details

#render_exception_with_raven(env_or_request, exception) ⇒ Object


20
21
22
23
24
25
26
27
# File 'lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb', line 20

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