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
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue