aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-01-12 10:28:21 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-01-12 11:15:11 -0800
commit16ae08fff0f16b3f0eb7757e01aabb02b257bd35 (patch)
treeab8973ecad9ea148421437a7af1ab2dd060033fc /actionpack/lib/action_dispatch/middleware/show_exceptions.rb
parent1d9c555297c15b6d5212e65c1afec718e043ce45 (diff)
downloadrails-16ae08fff0f16b3f0eb7757e01aabb02b257bd35.tar.gz
rails-16ae08fff0f16b3f0eb7757e01aabb02b257bd35.tar.bz2
rails-16ae08fff0f16b3f0eb7757e01aabb02b257bd35.zip
use raise to create exceptions and to set the backtrace
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/show_exceptions.rb')
-rw-r--r--actionpack/lib/action_dispatch/middleware/show_exceptions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
index 11739e08d9..dbe3206808 100644
--- a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
+++ b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
@@ -50,7 +50,7 @@ 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