mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
more descriptive return parameters
This commit is contained in:
parent
0a752e88c2
commit
7731fd86b1
1 changed files with 3 additions and 4 deletions
|
@ -16,15 +16,14 @@ module ActionDispatch
|
|||
|
||||
def call(env)
|
||||
begin
|
||||
response = @app.call(env)
|
||||
response = (_, headers, body = @app.call(env))
|
||||
|
||||
if response[1]['X-Cascade'] == 'pass'
|
||||
body = response[2]
|
||||
if headers['X-Cascade'] == 'pass'
|
||||
body.close if body.respond_to?(:close)
|
||||
raise ActionController::RoutingError, "No route matches [#{env['REQUEST_METHOD']}] #{env['PATH_INFO'].inspect}"
|
||||
end
|
||||
rescue Exception => exception
|
||||
raise exception if env['action_dispatch.show_exceptions'] == false
|
||||
raise exception unless env['action_dispatch.show_exceptions']
|
||||
end
|
||||
|
||||
exception ? render_exception(env, exception) : response
|
||||
|
|
Loading…
Reference in a new issue