worker: catch all exceptions, try to exit usefully/safely
authorBryan O'Sullivan <bryano@fb.com>
Thu, 11 Apr 2013 13:30:31 -0700
changeset 18908 779e3d9b7a1d
parent 18907 af9fa8d4c939
child 18909 3a72c89a83ec
worker: catch all exceptions, try to exit usefully/safely
mercurial/worker.py
--- a/mercurial/worker.py	Thu Apr 11 13:30:27 2013 -0700
+++ b/mercurial/worker.py	Thu Apr 11 13:30:31 2013 -0700
@@ -89,6 +89,11 @@
                 os._exit(0)
             except KeyboardInterrupt:
                 os._exit(255)
+            except: # re-raises (close enough for debugging anyway)
+                try:
+                    ui.traceback()
+                finally:
+                    os._exit(255)
         pids.append(pid)
     pids.reverse()
     os.close(wfd)