diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-10-25 11:25:29 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-10-25 11:25:29 -0700 |
commit | facd3e87104b0b9bc1142471b76d7b0c80d7062e (patch) | |
tree | 36e187d24993914608f2c38ef807e592edbe2072 /actionpack/lib/action_dispatch | |
parent | 6033e8aeb003a37c0ebce8f6edb4349d94c8e712 (diff) | |
download | rails-facd3e87104b0b9bc1142471b76d7b0c80d7062e.tar.gz rails-facd3e87104b0b9bc1142471b76d7b0c80d7062e.tar.bz2 rails-facd3e87104b0b9bc1142471b76d7b0c80d7062e.zip |
do not lose backtrace information from the raised exception
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/http/request.rb | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index fc8825d6d9..18cf5b2bb0 100644 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -251,21 +251,17 @@ module ActionDispatch # Override Rack's GET method to support indifferent access def GET - begin - @env["action_dispatch.request.query_parameters"] ||= (normalize_parameters(super) || {}) - rescue TypeError => e - raise ActionController::BadRequest, "Invalid query parameters: #{e.message}" - end + @env["action_dispatch.request.query_parameters"] ||= (normalize_parameters(super) || {}) + rescue TypeError => e + raise ActionController::BadRequest, "Invalid query parameters: #{e.message}", e.backtrace end alias :query_parameters :GET # Override Rack's POST method to support indifferent access def POST - begin - @env["action_dispatch.request.request_parameters"] ||= (normalize_parameters(super) || {}) - rescue TypeError => e - raise ActionController::BadRequest, "Invalid request parameters: #{e.message}" - end + @env["action_dispatch.request.request_parameters"] ||= (normalize_parameters(super) || {}) + rescue TypeError => e + raise ActionController::BadRequest, "Invalid request parameters: #{e.message}", e.backtrace end alias :request_parameters :POST |