summaryrefslogtreecommitdiffstats
path: root/generic/tkCmds.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-07-30 09:08:25 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-07-30 09:08:25 (GMT)
commit0bd347649db35a0b43e0a0ba3d443d4f1f9b3d2b (patch)
tree031f1c2df728052af4573ff7ea91cadf69634adf /generic/tkCmds.c
parentca5623894dd113cd5642189574cf6c104c64cad8 (diff)
downloadtk-0bd347649db35a0b43e0a0ba3d443d4f1f9b3d2b.zip
tk-0bd347649db35a0b43e0a0ba3d443d4f1f9b3d2b.tar.gz
tk-0bd347649db35a0b43e0a0ba3d443d4f1f9b3d2b.tar.bz2
more auditing of error codes
Diffstat (limited to 'generic/tkCmds.c')
-rw-r--r--generic/tkCmds.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index 08eb377..2955105 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -1598,7 +1598,8 @@ Tk_WinfoObjCmd(
if (strcmp(name, "?bad atom?") == 0) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"no atom exists with id \"%s\"", Tcl_GetString(objv[2])));
- Tcl_SetErrorCode(interp, "TK", "LOOKUP", "ATOM", NULL);
+ Tcl_SetErrorCode(interp, "TK", "LOOKUP", "ATOM",
+ Tcl_GetString(objv[2]), NULL);
return TCL_ERROR;
}
Tcl_SetObjResult(interp, Tcl_NewStringObj(name, -1));
@@ -1659,7 +1660,7 @@ Tk_WinfoObjCmd(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"window id \"%s\" doesn't exist in this application",
string));
- Tcl_SetErrorCode(interp, "TK", "LOOKUP", "WINDOW", NULL);
+ Tcl_SetErrorCode(interp, "TK", "LOOKUP", "WINDOW", string, NULL);
return TCL_ERROR;
}
@@ -1781,7 +1782,7 @@ Tk_WinfoObjCmd(
if (visInfoPtr == NULL) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"can't find any visuals for screen", -1));
- Tcl_SetErrorCode(interp, "TK", "LOOKUP", "VISUAL", NULL);
+ Tcl_SetErrorCode(interp, "TK", "VISUAL", "NONE", NULL);
return TCL_ERROR;
}
resultPtr = Tcl_NewObj();
@@ -1904,7 +1905,8 @@ Tk_WmObjCmd(
if (!(winPtr->flags & TK_TOP_LEVEL)) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"window \"%s\" isn't a top-level window", winPtr->pathName));
- Tcl_SetErrorCode(interp, "TK", "LOOKUP", "TOPLEVEL", NULL);
+ Tcl_SetErrorCode(interp, "TK", "LOOKUP", "TOPLEVEL", winPtr->pathName,
+ NULL);
return TCL_ERROR;
}