diff options
author | dkf <dkf@noemail.net> | 2004-10-29 15:39:02 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2004-10-29 15:39:02 (GMT) |
commit | 43a9f202c857b1b9e50a149e7df13b81aa4533d5 (patch) | |
tree | 0fe2010a58b021f880f03fd319b7dce9e764cd63 /generic/tclConfig.c | |
parent | 1d762834c4c15198d55f2bf9e9807461c62e2f62 (diff) | |
download | tcl-43a9f202c857b1b9e50a149e7df13b81aa4533d5.zip tcl-43a9f202c857b1b9e50a149e7df13b81aa4533d5.tar.gz tcl-43a9f202c857b1b9e50a149e7df13b81aa4533d5.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
FossilOrigin-Name: 7162a54053e53f6f469b5d978fca906c9880d363
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; } |