Add reporting instructions to unknown exception backtraces
authormpm@selenic.com
Wed, 07 Sep 2005 23:57:59 -0700
changeset 1215 8b4435aae40a
parent 1214 34706a835d4a
child 1216 1639fc7c2ccf
Add reporting instructions to unknown exception backtraces
mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2003,5 +2003,12 @@ def dispatch(args):
     except UnknownCommand, inst:
         u.warn("hg: unknown command '%s'\n" % inst.args[0])
         help_(u, 'shortlist')
+    except SystemExit:
+        # don't catch this is the catch-all below
+        raise
+    except:
+        u.warn("** unknown exception encountered, details follow\n")
+        u.warn("** report bug details to mercurial@selenic.com\n")
+        raise
 
     sys.exit(-1)