aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2013-10-26 11:27:03 -0700
committerSantiago Pastorino <santiago@wyeworks.com>2013-10-26 11:27:03 -0700
commit52199d1fd41ffc439357c16a7873fb04444175cd (patch)
tree781902774a85dfcb8fcaab3824f7e999e1b6d3cc
parentdb61355f7171819c078847337aa65f8d74aec4b8 (diff)
parent0f0630aaaeef2a7f9b57e09906a420b99a4f862f (diff)
downloadrails-52199d1fd41ffc439357c16a7873fb04444175cd.tar.gz
rails-52199d1fd41ffc439357c16a7873fb04444175cd.tar.bz2
rails-52199d1fd41ffc439357c16a7873fb04444175cd.zip
Merge pull request #12655 from rails/ps-remove-surprise-if-in-show-exception-middleware
Remove surprise if from show_exception middleware
-rw-r--r--actionpack/lib/action_dispatch/middleware/show_exceptions.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
index fcc5bc12c4..1d4f0f89a6 100644
--- a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
+++ b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
@@ -29,8 +29,11 @@ module ActionDispatch
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