From cc19bbfef6ba7239a49a2ad59723ac8af9d9109a Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sun, 1 Jun 2014 15:08:35 -0700 Subject: [PATCH] Less confusing invalid argument errors. --- common/modules/commands.jsm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/modules/commands.jsm b/common/modules/commands.jsm index d1bb43f7..0fab7bcb 100644 --- a/common/modules/commands.jsm +++ b/common/modules/commands.jsm @@ -1113,7 +1113,7 @@ var Commands = Module("commands", { if (arg == null || (typeof arg == "number" && isNaN(arg))) { if (!complete || orig != "" || args.completeStart != str.length) - fail(_("command.invalidOptTypeArg", opt.type.description, optname, argString)); + fail(_("command.invalidOptTypeArg", opt.type.description, optname, quoted)); if (complete) complete.highlight(args.completeStart, count - 1, "SPELLCHECK"); } @@ -1122,7 +1122,7 @@ var Commands = Module("commands", { // we have a validator function if (typeof opt.validator == "function") { if (opt.validator(arg, quoted) == false && (arg || !complete)) { - fail(_("command.invalidOptArg", optname, argString)); + fail(_("command.invalidOptArg", optname, quoted)); if (complete) // Always true. complete.highlight(args.completeStart, count - 1, "SPELLCHECK"); }