##// 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 214 # to translate them to the proper exception class in the vcs
215 215 # client layer.
216 216 kind = getattr(e, '_vcs_kind', None)
217 exc_name = getattr(e, '_vcs_server_org_exc_name', None)
217 218
218 219 if kind:
219 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 223 else:
222 args = [__traceback_info__ or 'unhandledException']
224 args = [__traceback_info__ or '{}: UnhandledException'.format(exc_name)]
223 225 if debug or __traceback_info__ and kind not in ['unhandled', 'lookup']:
224 226 # for other than unhandled errors also log the traceback
225 227 # can be useful for debugging
226 228 log.error(__traceback_info__)
229
227 230 raise _EXCEPTION_MAP[kind](*args)
228 231 else:
229 232 raise
General Comments 0
You need to be logged in to leave comments. Login now