diff options
author | dkf <dkf@noemail.net> | 2014-09-10 08:24:59 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2014-09-10 08:24:59 (GMT) |
commit | b65aba0840d07d381ecab65bb30a8756be1047e9 (patch) | |
tree | 6e79bbd90bf4222c48a4b2fcae4f129a4c463b9d /generic/tclVar.c | |
parent | 9e76b1aca3113eb784d036078aa575fd5e108a47 (diff) | |
parent | 1b5df550b8dd42dc91485adaec8f37ab41200019 (diff) | |
download | tcl-b65aba0840d07d381ecab65bb30a8756be1047e9.zip tcl-b65aba0840d07d381ecab65bb30a8756be1047e9.tar.gz tcl-b65aba0840d07d381ecab65bb30a8756be1047e9.tar.bz2 |
[2486824] Improve error message; not all that upvars is an upvar.
FossilOrigin-Name: aa55afef990601a3750bcb505bbaeee4095ce1ff
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r-- | generic/tclVar.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c index 5e3157e..ec4c13c 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -4405,8 +4405,8 @@ ObjMakeUpvar( || !HasLocalVars(varFramePtr) || (strstr(TclGetString(myNamePtr), "::") != NULL))) { Tcl_SetObjResult((Tcl_Interp *) iPtr, Tcl_ObjPrintf( - "bad variable name \"%s\": upvar won't create " - "namespace variable that refers to procedure variable", + "bad variable name \"%s\": can't create namespace " + "variable that refers to procedure variable", TclGetString(myNamePtr))); Tcl_SetErrorCode(interp, "TCL", "UPVAR", "INVERTED", NULL); return TCL_ERROR; @@ -4506,9 +4506,8 @@ TclPtrObjMakeUpvar( */ Tcl_SetObjResult((Tcl_Interp *) iPtr, Tcl_ObjPrintf( - "bad variable name \"%s\": upvar won't create a" - " scalar variable that looks like an array element", - myName)); + "bad variable name \"%s\": can't create a scalar " + "variable that looks like an array element", myName)); Tcl_SetErrorCode(interp, "TCL", "UPVAR", "LOCAL_ELEMENT", NULL); return TCL_ERROR; |