aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@plataformatec.com.br>2013-01-07 05:01:50 -0800
committerJosé Valim <jose.valim@plataformatec.com.br>2013-01-07 05:01:50 -0800
commit411de5ae379190613d86032d7bad53ec0191653a (patch)
tree726ee812c4e15a85294476bbb34d69325c8c8872 /actionpack
parente63e280bed3a0c7ef6925ae61e4322f730cce627 (diff)
parenta7f9c596b3c793ef5e0025719f75147334acbab7 (diff)
downloadrails-411de5ae379190613d86032d7bad53ec0191653a.tar.gz
rails-411de5ae379190613d86032d7bad53ec0191653a.tar.bz2
rails-411de5ae379190613d86032d7bad53ec0191653a.zip
Merge pull request #8798 from goshakkk/show-exceptions-begin-rescue
Refactor ShowExceptions' #call to use def-rescue instead of begin-rescue
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/middleware/show_exceptions.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
index 07ecf9702e..fcc5bc12c4 100644
--- a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
+++ b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
@@ -27,13 +27,10 @@ module ActionDispatch
end
def call(env)
- begin
- response = @app.call(env)
- rescue Exception => exception
- raise exception if env['action_dispatch.show_exceptions'] == false
- end
-
- response || render_exception(env, exception)
+ @app.call(env)
+ rescue Exception => exception
+ raise exception if env['action_dispatch.show_exceptions'] == false
+ render_exception(env, exception)
end
private