logging: log traceback for errors that are known to help debugging.
This commit is contained in:
parent
9bf25f60d0
commit
b40cdfbdac
1 changed files with 7 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue