aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-01-12 21:19:10 +0100
committerXavier Noria <fxn@hashref.com>2011-01-12 21:19:10 +0100
commit8b293e99ff2da0b5a60ff7bc5cde7bda9a2f715e (patch)
tree68afb497f317dab1652defe0f96bd20051b572cf /actionpack/lib/action_dispatch/middleware
parent5bc98c9510a369a22b856cbe952d640f3825bb5c (diff)
parent31293ba9d33f5b5f62ee760a548b4f5438183f22 (diff)
downloadrails-8b293e99ff2da0b5a60ff7bc5cde7bda9a2f715e.tar.gz
rails-8b293e99ff2da0b5a60ff7bc5cde7bda9a2f715e.tar.bz2
rails-8b293e99ff2da0b5a60ff7bc5cde7bda9a2f715e.zip
Merge branch 'master' of github.com:rails/rails
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-rw-r--r--actionpack/lib/action_dispatch/middleware/show_exceptions.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
index 936fd548b9..dbe3206808 100644
--- a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
+++ b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
@@ -50,11 +50,11 @@ module ActionDispatch
# Only this middleware cares about RoutingError. So, let's just raise
# it here.
if headers['X-Cascade'] == 'pass'
- exception = ActionController::RoutingError.new("No route matches #{env['PATH_INFO'].inspect}")
+ raise ActionController::RoutingError, "No route matches #{env['PATH_INFO'].inspect}"
end
rescue Exception => exception
+ raise exception if env['action_dispatch.show_exceptions'] == false
end
- raise exception if env['action_dispatch.show_exceptions'] == false
exception ? render_exception(env, exception) : [status, headers, body]
end