summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixWm.c
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2012-07-30 09:08:25 (GMT)
committerdkf <dkf@noemail.net>2012-07-30 09:08:25 (GMT)
commitf6cd9146176b69fed2601313e2c7b30447b1aac4 (patch)
tree031f1c2df728052af4573ff7ea91cadf69634adf /unix/tkUnixWm.c
parent2112a76a64dc50c4e3dd1605bbf24cc0336c9987 (diff)
downloadtk-f6cd9146176b69fed2601313e2c7b30447b1aac4.zip
tk-f6cd9146176b69fed2601313e2c7b30447b1aac4.tar.gz
tk-f6cd9146176b69fed2601313e2c7b30447b1aac4.tar.bz2
more auditing of error codes
FossilOrigin-Name: aae315a30f0b4367d59525a21dfb5139c4440a36
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) {