# HG changeset patch # User Marcin Kuzminski # Date 2018-07-04 23:58:33 # Node ID 439940e997fc92525ea55173eb24974b3a25e593 # Parent cba3b2db7a55dc16e1c5e41c9f9e0e88b4f76dc8 errors: use a better interface to track exceptions and tracebacks. diff --git a/vcsserver/http_main.py b/vcsserver/http_main.py --- a/vcsserver/http_main.py +++ b/vcsserver/http_main.py @@ -460,10 +460,13 @@ class HTTPApplication(object): status_code = request.headers.get('X-RC-Locked-Status-Code') return HTTPRepoLocked( title=exception.message, status_code=status_code) + traceback_info = 'unavailable' + if request.exc_info: + traceback_info = traceback.format_exc(request.exc_info[2]) - # Re-raise exception if we can not handle it. - log.exception( - 'error occurred handling this request for path: %s', request.path) + log.error( + 'error occurred handling this request for path: %s, \n tb: %s', + request.path, traceback_info) raise exception