# HG changeset patch # User Daniel Dourvaris # Date 2016-06-14 09:02:49 # Node ID 54a17768f32b1662ccfd440787d2468352484e5a # Parent f246f4bc4ec2f28327a849c8b9a52b0820192f9c errorpages: convert general exceptions to error page if toolbar disabled diff --git a/rhodecode/config/middleware.py b/rhodecode/config/middleware.py --- a/rhodecode/config/middleware.py +++ b/rhodecode/config/middleware.py @@ -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