##// END OF EJS Templates
error-view: expose traceback variable in error view.
marcink -
r1915:33fd40f0 default
parent child Browse files
Show More
@@ -22,6 +22,7 b''
22 Pylons middleware initialization
22 Pylons middleware initialization
23 """
23 """
24 import logging
24 import logging
25 import traceback
25 from collections import OrderedDict
26 from collections import OrderedDict
26
27
27 from paste.registry import RegistryManager
28 from paste.registry import RegistryManager
@@ -36,8 +37,6 b' from pyramid.httpexceptions import ('
36 from pyramid.events import ApplicationCreated
37 from pyramid.events import ApplicationCreated
37 from pyramid.renderers import render_to_response
38 from pyramid.renderers import render_to_response
38 from routes.middleware import RoutesMiddleware
39 from routes.middleware import RoutesMiddleware
39 import routes.util
40
41 import rhodecode
40 import rhodecode
42
41
43 from rhodecode.model import meta
42 from rhodecode.model import meta
@@ -48,7 +47,6 b' from rhodecode.config.environment import'
48
47
49 from rhodecode.lib.vcs import VCSCommunicationError
48 from rhodecode.lib.vcs import VCSCommunicationError
50 from rhodecode.lib.exceptions import VCSServerUnavailable
49 from rhodecode.lib.exceptions import VCSServerUnavailable
51 from rhodecode.lib.middleware import csrf
52 from rhodecode.lib.middleware.appenlight import wrap_in_appenlight_if_enabled
50 from rhodecode.lib.middleware.appenlight import wrap_in_appenlight_if_enabled
53 from rhodecode.lib.middleware.error_handling import (
51 from rhodecode.lib.middleware.error_handling import (
54 PylonsErrorHandlingMiddleware)
52 PylonsErrorHandlingMiddleware)
@@ -254,7 +252,7 b' def error_handler(exception, request):'
254 if hasattr(base_response, 'causes'):
252 if hasattr(base_response, 'causes'):
255 c.causes = base_response.causes
253 c.causes = base_response.causes
256 c.messages = helpers.flash.pop_messages(request=request)
254 c.messages = helpers.flash.pop_messages(request=request)
257
255 c.traceback = traceback.format_exc()
258 response = render_to_response(
256 response = render_to_response(
259 '/errors/error_document.mako', {'c': c, 'h': helpers}, request=request,
257 '/errors/error_document.mako', {'c': c, 'h': helpers}, request=request,
260 response=base_response)
258 response=base_response)
General Comments 0
You need to be logged in to leave comments. Login now