1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

refactor ShowExceptions' #call to use def-rescue instead of begin-rescue

This commit is contained in:
Gosha Arinich 2013-01-07 15:58:55 +03:00
parent f5da2e82c2
commit a7f9c596b3

View file

@ -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