summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authormdejong <mdejong>2003-02-06 22:44:56 (GMT)
committermdejong <mdejong>2003-02-06 22:44:56 (GMT)
commit8a99de882edc8565ff543a67a58e02f5f517ba7c (patch)
treedf7b90a9df2be40d32ff63faf11c6adc5c8ea2fd /generic
parentd42212caff8b39b67e45ffb2f80c0ca9123a7cae (diff)
downloadtcl-8a99de882edc8565ff543a67a58e02f5f517ba7c.zip
tcl-8a99de882edc8565ff543a67a58e02f5f517ba7c.tar.gz
tcl-8a99de882edc8565ff543a67a58e02f5f517ba7c.tar.bz2
* generic/tclExecute.c (TclExecuteByteCode): When an
error is encountered reading the increment value during a compiled call to incr, add a "(reading increment)" error string to the errorInfo variable. This makes the errorInfo variable set by the compiled incr command match the value set by the non-compiled version. * tests/incr-old.test: Change errorInfo result for the compiled incr command case to match the modified implementation. * tests/incr.test: Add tests to make sure the compiled and non-compiled errorInfo messages are the same.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclExecute.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index ef7797b..93bf3a9 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclExecute.c,v 1.91 2003/01/08 21:29:06 dgp Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.92 2003/02/06 22:44:57 mdejong Exp $
*/
#include "tclInt.h"
@@ -1918,6 +1918,7 @@ TclExecuteByteCode(interp, codePtr)
if (result != TCL_OK) {
TRACE_WITH_OBJ(("%u (by %s) => ERROR converting increment amount to int: ",
opnd, O2S(valuePtr)), Tcl_GetObjResult(interp));
+ Tcl_AddErrorInfo(interp, "\n (reading increment)");
goto checkForCatch;
}
FORCE_LONG(valuePtr, i, w);