summaryrefslogtreecommitdiffstats
path: root/generic/tclConfig.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-03-29 15:06:26 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-03-29 15:06:26 (GMT)
commit745e8c0f0c7738399832095373a18bb4b1059f48 (patch)
tree7b42e235b3c15fbe37739b245bd70c1458f5fe72 /generic/tclConfig.c
parent2f8d53558cab778cfc9115a4f86cb1269eac501a (diff)
downloadtcl-745e8c0f0c7738399832095373a18bb4b1059f48.zip
tcl-745e8c0f0c7738399832095373a18bb4b1059f48.tar.gz
tcl-745e8c0f0c7738399832095373a18bb4b1059f48.tar.bz2
More generation of errorCode information, notably when lists are mis-parsed.
Diffstat (limited to 'generic/tclConfig.c')
-rw-r--r--generic/tclConfig.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tclConfig.c b/generic/tclConfig.c
index 8d42e21..3ad5dfd 100644
--- a/generic/tclConfig.c
+++ b/generic/tclConfig.c
@@ -237,6 +237,8 @@ QueryConfigObjCmd(
*/
Tcl_SetResult(interp, "package not known", TCL_STATIC);
+ Tcl_SetErrorCode(interp, "TCL", "FATAL", "PKGCFG_BASE",
+ Tcl_GetString(pkgName), NULL);
return TCL_ERROR;
}
@@ -247,9 +249,11 @@ QueryConfigObjCmd(
return TCL_ERROR;
}
- if (Tcl_DictObjGet(interp, pkgDict, objv [2], &val) != TCL_OK
+ if (Tcl_DictObjGet(interp, pkgDict, objv[2], &val) != TCL_OK
|| val == NULL) {
Tcl_SetResult(interp, "key not known", TCL_STATIC);
+ Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CONFIG",
+ Tcl_GetString(objv[2]), NULL);
return TCL_ERROR;
}
@@ -268,6 +272,7 @@ QueryConfigObjCmd(
if (!listPtr) {
Tcl_SetResult(interp, "insufficient memory to create list",
TCL_STATIC);
+ Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL);
return TCL_ERROR;
}