Skip to content
Browse files

Merge pull request #12655 from rails/ps-remove-surprise-if-in-show-ex…

…ception-middleware

Remove surprise if from show_exception middleware
  • Loading branch information...
2 parents db61355 + 0f0630a commit 52199d1fd41ffc439357c16a7873fb04444175cd @spastorino spastorino committed Oct 26, 2013
Showing with 5 additions and 2 deletions.
  1. +5 −2 actionpack/lib/action_dispatch/middleware/show_exceptions.rb
View
7 actionpack/lib/action_dispatch/middleware/show_exceptions.rb
@@ -29,8 +29,11 @@ def initialize(app, exceptions_app)
def call(env)
@app.call(env)
rescue Exception => exception
- raise exception if env['action_dispatch.show_exceptions'] == false
- render_exception(env, exception)
+ if env['action_dispatch.show_exceptions'] == false
+ raise exception
+ else
+ render_exception(env, exception)
+ end
end
private

0 comments on commit 52199d1

Please sign in to comment.
Something went wrong with that request. Please try again.