errorpages: convert general exceptions to error page if toolbar disabled
This commit is contained in:
parent
ad8747e7bf
commit
cb75973073
1 changed files with 4 additions and 1 deletions
|
|
@ -261,7 +261,10 @@ def includeme(config):
|
|||
webob_to_pyramid_http_response(response), request)
|
||||
except HTTPError as e: # pyramid type exceptions
|
||||
return error_handler(e, request)
|
||||
|
||||
except Exception:
|
||||
if settings.get('debugtoolbar.enabled', False):
|
||||
raise
|
||||
return error_handler(HTTPInternalServerError(), request)
|
||||
return response
|
||||
|
||||
# This is the glue which allows us to migrate in chunks. By registering the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue