diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2014-09-10 08:24:59 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2014-09-10 08:24:59 (GMT) |
commit | 893b3f3b6945cbed2de0e75bf3b0ce06ceaf391c (patch) | |
tree | dd2cb87a1afb416ea575ca2e1208ddd2b672ea6e /generic/tclVar.c | |
parent | e19c2ce585d7fe309059bb96044b08dbfa850a6b (diff) | |
parent | 186cc4a17e82ce9bd90edccc45ab943c63b40c30 (diff) | |
download | tcl-893b3f3b6945cbed2de0e75bf3b0ce06ceaf391c.zip tcl-893b3f3b6945cbed2de0e75bf3b0ce06ceaf391c.tar.gz tcl-893b3f3b6945cbed2de0e75bf3b0ce06ceaf391c.tar.bz2 |
[2486824] Improve error message; not all that upvars is an upvar.
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; |