Permalink
Browse files

refactor ShowExceptions' #call to use def-rescue instead of begin-rescue

  • Loading branch information...
1 parent f5da2e8 commit a7f9c596b3c793ef5e0025719f75147334acbab7 @goshakkk goshakkk committed Jan 7, 2013
Showing with 4 additions and 7 deletions.
  1. +4 −7 actionpack/lib/action_dispatch/middleware/show_exceptions.rb
@@ -27,13 +27,10 @@ def initialize(app, exceptions_app)
end
def call(env)
- begin
- response = @app.call(env)
- rescue Exception => exception
- raise exception if env['action_dispatch.show_exceptions'] == false
- end
-
- response || render_exception(env, exception)
+ @app.call(env)
+ rescue Exception => exception
+ raise exception if env['action_dispatch.show_exceptions'] == false
+ render_exception(env, exception)
end
private

0 comments on commit a7f9c59

Please sign in to comment.