# HG changeset patch # User Marcin Kuzminski # Date 2017-12-16 15:05:38 # Node ID 67bb431669f0c0b73a720d5bc1d56cb94a41c151 # Parent c5bccf3633a33e504f8251947dc02baa3c95638f logging: log traceback for errors that are known to help debugging. diff --git a/rhodecode/lib/vcs/exceptions.py b/rhodecode/lib/vcs/exceptions.py --- a/rhodecode/lib/vcs/exceptions.py +++ b/rhodecode/lib/vcs/exceptions.py @@ -21,10 +21,12 @@ """ Custom vcs exceptions module. """ - +import logging import functools import urllib2 +log = logging.getLogger(__name__) + class VCSCommunicationError(Exception): pass @@ -203,7 +205,10 @@ def map_vcs_exceptions(func): args = e.args else: args = [__traceback_info__ or 'unhandledException'] - + if __traceback_info__ and kind != 'unhandled': + # for other than unhandled errors also log the traceback + # can be usefull for debugging + log.error(__traceback_info__) raise _EXCEPTION_MAP[kind](*args) else: raise