comparison mercurial/dispatch.py @ 32041:38963a53ab0d

dispatch: print traceback in scmutil.callcatch() if --traceback specified Otherwise, traceback wouldn't be printed for a known exception occurred in worker processes.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 15 Apr 2017 13:02:34 +0900
parents 0fb78cb90ca7
children cde72a195f32
comparison
equal deleted inserted replaced
32040:0fb78cb90ca7 32041:38963a53ab0d
253 except: # re-raises 253 except: # re-raises
254 # enter the debugger when we hit an exception 254 # enter the debugger when we hit an exception
255 if '--debugger' in req.args: 255 if '--debugger' in req.args:
256 traceback.print_exc() 256 traceback.print_exc()
257 debugmortem[debugger](sys.exc_info()[2]) 257 debugmortem[debugger](sys.exc_info()[2])
258 ui.traceback()
259 raise 258 raise
260 259
261 return _callcatch(ui, _runcatchfunc) 260 return _callcatch(ui, _runcatchfunc)
262 261
263 def _callcatch(ui, func): 262 def _callcatch(ui, func):