summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixWm.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 /unix/tkUnixWm.c
parentca5623894dd113cd5642189574cf6c104c64cad8 (diff)
downloadtk-0bd347649db35a0b43e0a0ba3d443d4f1f9b3d2b.zip
tk-0bd347649db35a0b43e0a0ba3d443d4f1f9b3d2b.tar.gz
tk-0bd347649db35a0b43e0a0ba3d443d4f1f9b3d2b.tar.bz2
more auditing of error codes
Diffstat (limited to 'unix/tkUnixWm.c')
-rw-r--r--unix/tkUnixWm.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index e63da88..bcd3fcb 100644
--- a/unix/tkUnixWm.c
+++ b/unix/tkUnixWm.c
@@ -1084,7 +1084,8 @@ Tk_WmObjCmd(
(index != WMOPT_MANAGE) && (index != WMOPT_FORGET)) {
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;
}
@@ -2622,7 +2623,7 @@ WmIconwindowCmd(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"can't use %s as icon window: not at top level",
Tcl_GetString(objv[3])));
- Tcl_SetErrorCode(interp, "TK", "WM", "ICONWIN", "INNER", NULL);
+ Tcl_SetErrorCode(interp, "TK", "WM", "ICONWINDOW", "INNER", NULL);
return TCL_ERROR;
}
wmPtr2 = ((TkWindow *) tkwin2)->wmInfoPtr;
@@ -2630,7 +2631,7 @@ WmIconwindowCmd(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"%s is already an icon for %s",
Tcl_GetString(objv[3]), Tk_PathName(wmPtr2->iconFor)));
- Tcl_SetErrorCode(interp, "TK", "WM", "ICONWIN", "ICON", NULL);
+ Tcl_SetErrorCode(interp, "TK", "WM", "ICONWINDOW", "ICON", NULL);
return TCL_ERROR;
}
if (wmPtr->icon != NULL) {
@@ -2709,7 +2710,7 @@ WmManageCmd(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"window \"%s\" is not manageable: must be a frame,"
" labelframe or toplevel", Tk_PathName(frameWin)));
- Tcl_SetErrorCode(interp, "TK", "WM", "MANAGE", "TYPE", NULL);
+ Tcl_SetErrorCode(interp, "TK", "WM", "MANAGE", NULL);
return TCL_ERROR;
}
TkFocusSplit(winPtr);
@@ -3302,7 +3303,7 @@ WmStackorderCmd(
if (windows == NULL) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"TkWmStackorderToplevel failed", -1));
- Tcl_SetErrorCode(interp, "TK", "WM", "STACK", "INTERNAL", NULL);
+ Tcl_SetErrorCode(interp, "TK", "WM", "COMMUNICATION", NULL);
return TCL_ERROR;
}
@@ -3391,15 +3392,15 @@ WmStateCmd(
"can't iconify \"%s\": override-redirect flag is set",
winPtr->pathName));
Tcl_SetErrorCode(interp, "TK", "WM", "STATE",
- "ICONIFY_REDIRECTED", NULL);
+ "OVERRIDE_REDIRECT", NULL);
return TCL_ERROR;
}
if (wmPtr->masterPtr != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"can't iconify \"%s\": it is a transient",
winPtr->pathName));
- Tcl_SetErrorCode(interp, "TK", "WM", "STATE",
- "ICONIFY_TRANSIENT", NULL);
+ Tcl_SetErrorCode(interp, "TK", "WM", "STATE", "TRANSIENT",
+ NULL);
return TCL_ERROR;
}
if (TkpWmSetState(winPtr, IconicState) == 0) {