mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Pass the env to the lowlevel_error handler. Fixes #854
This commit is contained in:
parent
1dd5f91d8d
commit
20e99d1c04
1 changed files with 3 additions and 3 deletions
|
@ -740,7 +740,7 @@ module Puma
|
|||
rescue StandardError => e
|
||||
@events.unknown_error self, e, "Rack app"
|
||||
|
||||
status, headers, res_body = lowlevel_error(e)
|
||||
status, headers, res_body = lowlevel_error(e, env)
|
||||
end
|
||||
|
||||
return handle_app_response(req, lines, env, status, headers, res_body)
|
||||
|
@ -807,9 +807,9 @@ module Puma
|
|||
|
||||
# A fallback rack response if +@app+ raises as exception.
|
||||
#
|
||||
def lowlevel_error(e)
|
||||
def lowlevel_error(e, env)
|
||||
if handler = @options[:lowlevel_error_handler]
|
||||
return handler.call(e)
|
||||
return handler.call(e, env)
|
||||
end
|
||||
|
||||
if @leak_stack_on_error
|
||||
|
|
Loading…
Reference in a new issue