diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2011-03-29 15:06:26 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2011-03-29 15:06:26 (GMT) |
commit | ce1706f3395619dee86a51d89a76c9537e4d8fe3 (patch) | |
tree | 7b42e235b3c15fbe37739b245bd70c1458f5fe72 /generic/tclConfig.c | |
parent | 5b43ec40f8e8d1787c1d12eec18205bfbf1fef1e (diff) | |
download | tcl-ce1706f3395619dee86a51d89a76c9537e4d8fe3.zip tcl-ce1706f3395619dee86a51d89a76c9537e4d8fe3.tar.gz tcl-ce1706f3395619dee86a51d89a76c9537e4d8fe3.tar.bz2 |
More generation of errorCode information, notably when lists are mis-parsed.
Diffstat (limited to 'generic/tclConfig.c')
-rw-r--r-- | generic/tclConfig.c | 7 |
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; } |