lib/raven/rack.rb in sentry-raven-0.7.1 vs lib/raven/rack.rb in sentry-raven-0.8.0
- old
+ new
@@ -43,23 +43,21 @@
# callers
Raven.rack_context(env)
begin
response = @app.call(env)
- rescue Error => e
+ rescue Error
raise # Don't capture Raven errors
rescue Exception => e
Raven::Rack.capture_exception(e, env)
raise
ensure
Context.clear!
end
error = env['rack.exception'] || env['sinatra.error']
- if error
- Raven::Rack.capture_exception(error, env)
- end
+ Raven::Rack.capture_exception(error, env) if error
response
end
end
end