changeset 18908:779e3d9b7a1d

worker: catch all exceptions, try to exit usefully/safely
author Bryan O'Sullivan <bryano@fb.com>
date Thu, 11 Apr 2013 13:30:31 -0700
parents af9fa8d4c939
children 3a72c89a83ec
files mercurial/worker.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)