Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 52199d1fd41ffc439357c16a7873fb04444175cd 2 parents db61355 + 0f0630a
@spastorino spastorino authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.