##// END OF EJS Templates
exceptions: improved reporting of unhandled vcsserver exceptions
milka -
r4535:d67d12de default
parent child Browse files
Show More
@@ -214,16 +214,19 b' def map_vcs_exceptions(func):'
214 # to translate them to the proper exception class in the vcs
214 # to translate them to the proper exception class in the vcs
215 # client layer.
215 # client layer.
216 kind = getattr(e, '_vcs_kind', None)
216 kind = getattr(e, '_vcs_kind', None)
217 exc_name = getattr(e, '_vcs_server_org_exc_name', None)
217
218
218 if kind:
219 if kind:
219 if any(e.args):
220 if any(e.args):
220 args = e.args
221 args = [a for a in e.args]
222 args[0] = '{}:'.format(exc_name) # prefix first arg with org exc name
221 else:
223 else:
222 args = [__traceback_info__ or 'unhandledException']
224 args = [__traceback_info__ or '{}: UnhandledException'.format(exc_name)]
223 if debug or __traceback_info__ and kind not in ['unhandled', 'lookup']:
225 if debug or __traceback_info__ and kind not in ['unhandled', 'lookup']:
224 # for other than unhandled errors also log the traceback
226 # for other than unhandled errors also log the traceback
225 # can be useful for debugging
227 # can be useful for debugging
226 log.error(__traceback_info__)
228 log.error(__traceback_info__)
229
227 raise _EXCEPTION_MAP[kind](*args)
230 raise _EXCEPTION_MAP[kind](*args)
228 else:
231 else:
229 raise
232 raise
General Comments 0
You need to be logged in to leave comments. Login now