lib/raven/integrations/rails/middleware/debug_exceptions_catcher.rb in sentry-raven-0.15.4 vs lib/raven/integrations/rails/middleware/debug_exceptions_catcher.rb in sentry-raven-0.15.5
- old
+ new
@@ -4,12 +4,14 @@
module DebugExceptionsCatcher
def self.included(base)
base.send(:alias_method_chain, :render_exception, :raven)
end
- def render_exception_with_raven(env, exception)
+ def render_exception_with_raven(env_or_request, exception)
+ env = env_or_request.respond_to?(:env) ? env_or_request.env : env_or_request
Raven::Rack.capture_exception(exception, env)
- render_exception_without_raven(env, exception)
+ ensure
+ render_exception_without_raven(env_or_request, exception)
end
end
end
end
end