##// END OF EJS Templates
worker: print traceback for uncaught exception unconditionally...
Yuya Nishihara -
r32043:b844d0d3 default
parent child Browse files
Show More
@@ -159,7 +159,7 b' def _posixworker(ui, func, staticargs, a'
159 159 os._exit(255)
160 160 except: # never return, therefore no re-raises
161 161 try:
162 ui.traceback()
162 ui.traceback(force=True)
163 163 ui.flush()
164 164 finally:
165 165 os._exit(255)
@@ -13,12 +13,18 b' Test UI worker interaction'
13 13 > # by first worker for test stability
14 14 > raise error.Abort('known exception')
15 15 > return runme(ui, [])
16 > def exc(ui, args):
17 > if args[0] == 0:
18 > # by first worker for test stability
19 > raise Exception('unknown exception')
20 > return runme(ui, [])
16 21 > def runme(ui, args):
17 22 > for arg in args:
18 23 > ui.status('run\n')
19 24 > yield 1, arg
20 25 > functable = {
21 26 > 'abort': abort,
27 > 'exc': exc,
22 28 > 'runme': runme,
23 29 > }
24 30 > cmdtable = {}
@@ -76,3 +82,9 b' Known exception should be caught, but pr'
76 82 > test 100000.0 abort --traceback 2>&1 | grep '^Traceback'
77 83 Traceback (most recent call last):
78 84 Traceback (most recent call last):
85
86 Traceback must be printed for unknown exceptions
87
88 $ hg --config "extensions.t=$abspath" --config 'worker.numcpus=2' \
89 > test 100000.0 exc 2>&1 | grep '^Traceback'
90 Traceback (most recent call last):
General Comments 0
You need to be logged in to leave comments. Login now