Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dispatch.py @ 45902:7eb221b9af6c
errors: make ParseError a subtype of Abort
I didn't plan this before, but the previous two changes made it really
easy to make `ParseError` a subtype of `Abort`. It seems obvious with
hindsight that I *should* have planned it :)
Differential Revision: https://phab.mercurial-scm.org/D9350
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 19 Nov 2020 15:13:39 -0800 |
parents | 600aec73f309 |
children | ca39c45014fa |
line wrap: on
line diff
--- a/mercurial/dispatch.py Fri Nov 20 13:24:45 2020 -0800 +++ b/mercurial/dispatch.py Thu Nov 19 15:13:39 2020 -0800 @@ -258,9 +258,6 @@ except error.Abort as inst: ferr.write(inst.format()) return -1 - except error.ParseError as inst: - ferr.write(inst.format()) - return -1 msg = _formatargs(req.args) starttime = util.timer() @@ -466,9 +463,6 @@ else: ui.warn(_(b"hg: %s\n") % inst.message) ui.warn(_(b"(use 'hg help -v' for a list of global options)\n")) - except error.ParseError as inst: - ui.warn(inst.format()) - return -1 except error.UnknownCommand as inst: nocmdmsg = _(b"hg: unknown command '%s'\n") % inst.command try: