summaryrefslogtreecommitdiffstats
path: root/generic/tclListObj.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-04-02 17:22:01 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-04-02 17:22:01 (GMT)
commitd2275aefb3bc8e96e7ae22e4609ba2c7604f86fe (patch)
tree0c83b53ed727a8b61d6af80643849e7f51ccac33 /generic/tclListObj.c
parentf4b7658650c49deb8518bb22558332a16264cdf6 (diff)
downloadtcl-d2275aefb3bc8e96e7ae22e4609ba2c7604f86fe.zip
tcl-d2275aefb3bc8e96e7ae22e4609ba2c7604f86fe.tar.gz
tcl-d2275aefb3bc8e96e7ae22e4609ba2c7604f86fe.tar.bz2
More generation of errorCodes ([interp], [lset], [load], [unload]).
Diffstat (limited to 'generic/tclListObj.c')
-rw-r--r--generic/tclListObj.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index b27163d..9128333 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -1339,6 +1339,8 @@ TclLsetFlat(
/* ...the index points outside the sublist. */
Tcl_SetObjResult(interp,
Tcl_NewStringObj("list index out of range", -1));
+ Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSET", "BADINDEX",
+ NULL);
break;
}
@@ -1511,6 +1513,8 @@ TclListObjSetElement(
if (!length) {
Tcl_SetObjResult(interp,
Tcl_NewStringObj("list index out of range", -1));
+ Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSET", "BADINDEX",
+ NULL);
return TCL_ERROR;
}
result = SetListFromAny(interp, listPtr);
@@ -1531,6 +1535,8 @@ TclListObjSetElement(
if (interp != NULL) {
Tcl_SetObjResult(interp,
Tcl_NewStringObj("list index out of range", -1));
+ Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSET", "BADINDEX",
+ NULL);
}
return TCL_ERROR;
}