# HG changeset patch # User Matt Mackall # Date 1275700793 18000 # Node ID b901bb751999b0385722c5708a5cf5e6436e251f # Parent ccfd1cbc7289f1a4ed7308f44b93527c7c1eb04d error: change ParseError to CommandError diff -r ccfd1cbc7289 -r b901bb751999 mercurial/dispatch.py --- 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') diff -r ccfd1cbc7289 -r b901bb751999 mercurial/error.py --- a/mercurial/error.py Fri Jun 04 20:13:51 2010 -0500 +++ b/mercurial/error.py Fri Jun 04 20:19:53 2010 -0500 @@ -27,7 +27,7 @@ def __str__(self): return RevlogError.__str__(self) -class ParseError(Exception): +class CommandError(Exception): """Exception raised on errors in parsing the command line.""" class ConfigError(Exception):