diff --git a/rhodecode/config/middleware.py b/rhodecode/config/middleware.py --- a/rhodecode/config/middleware.py +++ b/rhodecode/config/middleware.py @@ -248,7 +248,6 @@ def webob_to_pyramid_http_response(webob def error_handler(exception, request): - # TODO: dan: replace the old pylons error controller with this from rhodecode.model.settings import SettingsModel from rhodecode.lib.utils2 import AttributeDict @@ -277,6 +276,10 @@ def error_handler(exception, request): if not c.rhodecode_name: c.rhodecode_name = 'Rhodecode' + c.causes = [] + if hasattr(base_response, 'causes'): + c.causes = base_response.causes + response = render_to_response( '/errors/error_document.html', {'c': c}, request=request, response=base_response) diff --git a/rhodecode/lib/exceptions.py b/rhodecode/lib/exceptions.py --- a/rhodecode/lib/exceptions.py +++ b/rhodecode/lib/exceptions.py @@ -127,6 +127,11 @@ class VCSServerUnavailable(HTTPBadGatewa """ HTTP Exception class for VCS Server errors """ code = 502 title = 'VCS Server Error' + causes = [ + 'VCS Server is not running', + 'Incorrect vcs.server=host:port', + 'Incorrect vcs.server.protocol', + ] def __init__(self, message=''): self.explanation = 'Could not connect to VCS Server' if message: diff --git a/rhodecode/templates/errors/error_document.html b/rhodecode/templates/errors/error_document.html --- a/rhodecode/templates/errors/error_document.html +++ b/rhodecode/templates/errors/error_document.html @@ -39,11 +39,17 @@

${_('You will be redirected to %s in %s seconds') % (c.redirect_module,c.redirect_time)}

%endif
-

Possible Cause

+

Possible Causes