diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-29 15:39:02 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-29 15:39:02 (GMT) |
commit | f21fa0e01c0fb463b0ec26f3b0cef1218243908a (patch) | |
tree | 0fe2010a58b021f880f03fd319b7dce9e764cd63 /generic/tclConfig.c | |
parent | 151836cea1737631c005e07ca9a26e7641ff009d (diff) | |
download | tcl-f21fa0e01c0fb463b0ec26f3b0cef1218243908a.zip tcl-f21fa0e01c0fb463b0ec26f3b0cef1218243908a.tar.gz tcl-f21fa0e01c0fb463b0ec26f3b0cef1218243908a.tar.bz2 |
Allow ensembles to rewrite their subcommands' error messages to be more
relevant to users. [Patch 1056864]
Also patches to core to take advantage of this
Also other general cleaning up of Tcl_WrongNumArgs usage
Diffstat (limited to 'generic/tclConfig.c')
-rw-r--r-- | generic/tclConfig.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclConfig.c b/generic/tclConfig.c index 3cd5813..4daf92f 100644 --- a/generic/tclConfig.c +++ b/generic/tclConfig.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclConfig.c,v 1.5 2003/12/24 04:18:19 davygrvy Exp $ + * RCS: @(#) $Id: tclConfig.c,v 1.6 2004/10/29 15:39:05 dkf Exp $ */ #include "tclInt.h" @@ -209,7 +209,7 @@ QueryConfigObjCmd(clientData, interp, objc, objv) }; if ((objc < 2) || (objc > 3)) { - Tcl_WrongNumArgs (interp, 0, NULL, "list | get key"); + Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?argument?"); return TCL_ERROR; } if (Tcl_GetIndexFromObj(interp, objv[1], subcmdStrings, @@ -228,7 +228,7 @@ QueryConfigObjCmd(clientData, interp, objc, objv) switch ((enum subcmds) index) { case CFG_GET: if (objc != 3) { - Tcl_WrongNumArgs(interp, 0, NULL, "get key"); + Tcl_WrongNumArgs(interp, 1, objv, "get key"); return TCL_ERROR; } @@ -243,7 +243,7 @@ QueryConfigObjCmd(clientData, interp, objc, objv) case CFG_LIST: if (objc != 2) { - Tcl_WrongNumArgs(interp, 0, NULL, "list"); + Tcl_WrongNumArgs(interp, 1, objv, "list"); return TCL_ERROR; } |