--- 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')
--- 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):