summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdAH.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclCmdAH.c')
-rw-r--r--generic/tclCmdAH.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index a017a2d..3919f25 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdAH.c,v 1.84 2007/03/01 16:16:04 dgp Exp $
+ * RCS: @(#) $Id: tclCmdAH.c,v 1.85 2007/03/01 17:55:16 dgp Exp $
*/
#include "tclInt.h"
@@ -1804,11 +1804,11 @@ Tcl_ForeachObjCmd(
valuePtr = Tcl_NewObj(); /* Empty string */
}
varValuePtr = Tcl_ObjSetVar2(interp, varvList[i][v], NULL,
- valuePtr, 0);
+ valuePtr, TCL_LEAVE_ERR_MSG);
if (varValuePtr == NULL) {
- Tcl_ResetResult(interp);
- Tcl_AppendResult(interp, "couldn't set loop variable: \"",
- TclGetString(varvList[i][v]), "\"", NULL);
+ Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
+ "\n (setting foreach loop variable \"%s\"",
+ TclGetString(varvList[i][v])));
result = TCL_ERROR;
goto done;
}