##// END OF EJS Templates
logging: log traceback for errors that are known to help debugging.
marcink -
r2449:67bb4316 default
parent child Browse files
Show More
@@ -21,10 +21,12 b''
21 """
21 """
22 Custom vcs exceptions module.
22 Custom vcs exceptions module.
23 """
23 """
24
24 import logging
25 import functools
25 import functools
26 import urllib2
26 import urllib2
27
27
28 log = logging.getLogger(__name__)
29
28
30
29 class VCSCommunicationError(Exception):
31 class VCSCommunicationError(Exception):
30 pass
32 pass
@@ -203,7 +205,10 b' def map_vcs_exceptions(func):'
203 args = e.args
205 args = e.args
204 else:
206 else:
205 args = [__traceback_info__ or 'unhandledException']
207 args = [__traceback_info__ or 'unhandledException']
206
208 if __traceback_info__ and kind != 'unhandled':
209 # for other than unhandled errors also log the traceback
210 # can be usefull for debugging
211 log.error(__traceback_info__)
207 raise _EXCEPTION_MAP[kind](*args)
212 raise _EXCEPTION_MAP[kind](*args)
208 else:
213 else:
209 raise
214 raise
General Comments 0
You need to be logged in to leave comments. Login now