Mercurial > public > mercurial-scm > hg
diff mercurial/dispatch.py @ 11287:b901bb751999
error: change ParseError to CommandError
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 04 Jun 2010 20:19:53 -0500 |
parents | 385b95d10410 |
children | 2123aad24d56 |
line wrap: on
line diff
--- a/mercurial/dispatch.py Fri Jun 04 20:13:51 2010 -0500 +++ b/mercurial/dispatch.py Fri Jun 04 20:19:53 2010 -0500 @@ -73,7 +73,7 @@ except error.LockUnavailable, inst: ui.warn(_("abort: could not lock %s: %s\n") % (inst.desc or inst.filename, inst.strerror)) - except error.ParseError, inst: + except error.CommandError, inst: if inst.args[0]: ui.warn(_("hg %s: %s\n") % (inst.args[0], inst.args[1])) commands.help_(ui, inst.args[0]) @@ -258,7 +258,7 @@ try: args = fancyopts.fancyopts(args, commands.globalopts, options) except fancyopts.getopt.GetoptError, inst: - raise error.ParseError(None, inst) + raise error.CommandError(None, inst) if args: cmd, args = args[0], args[1:] @@ -281,7 +281,7 @@ try: args = fancyopts.fancyopts(args, c, cmdoptions, True) except fancyopts.getopt.GetoptError, inst: - raise error.ParseError(cmd, inst) + raise error.CommandError(cmd, inst) # separate global options back out for o in commands.globalopts: @@ -475,7 +475,7 @@ try: return cmdfunc() except error.SignatureError: - raise error.ParseError(cmd, _("invalid arguments")) + raise error.CommandError(cmd, _("invalid arguments")) if options['profile']: format = ui.config('profiling', 'format', default='text')