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:
parent
f5da2e82c2
commit
a7f9c596b3
1 changed files with 4 additions and 7 deletions
|
@ -27,13 +27,10 @@ module ActionDispatch
|
||||||
end
|
end
|
||||||
|
|
||||||
def call(env)
|
def call(env)
|
||||||
begin
|
@app.call(env)
|
||||||
response = @app.call(env)
|
|
||||||
rescue Exception => exception
|
rescue Exception => exception
|
||||||
raise exception if env['action_dispatch.show_exceptions'] == false
|
raise exception if env['action_dispatch.show_exceptions'] == false
|
||||||
end
|
render_exception(env, exception)
|
||||||
|
|
||||||
response || render_exception(env, exception)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in a new issue