##// END OF EJS Templates
dispatch: fix exit code of unhandled exception recorded in blackbox log...
Yuya Nishihara -
r38042:48853a92 default
parent child Browse files
Show More
@@ -208,7 +208,7 b' def dispatch(req):'
208 208
209 209 msg = _formatargs(req.args)
210 210 starttime = util.timer()
211 ret = -1
211 ret = 1 # default of Python exit code on unhandled exception
212 212 try:
213 213 ret = _runcatch(req) or 0
214 214 except error.ProgrammingError as inst:
@@ -239,7 +239,7 b' def dispatch(req):'
239 239 req.ui.log('uiblocked', 'ui blocked ms',
240 240 **pycompat.strkwargs(req.ui._blockedtimes))
241 241 req.ui.log("commandfinish", "%s exited %d after %0.2f seconds\n",
242 msg, ret or 0, duration)
242 msg, ret, duration)
243 243 try:
244 244 req._runexithandlers()
245 245 except: # exiting, so no re-raises
@@ -49,7 +49,7 b' unhandled exception'
49 49 $ hg crash 2> /dev/null
50 50 [1]
51 51 $ hg blackbox -l 2
52 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> crash exited -1 after * seconds (glob)
52 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> crash exited 1 after * seconds (glob)
53 53 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox -l 2
54 54
55 55 alias expansion is logged
General Comments 0
You need to be logged in to leave comments. Login now