diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-30 09:08:25 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-30 09:08:25 (GMT) |
commit | 0bd347649db35a0b43e0a0ba3d443d4f1f9b3d2b (patch) | |
tree | 031f1c2df728052af4573ff7ea91cadf69634adf /win/tkWinWm.c | |
parent | ca5623894dd113cd5642189574cf6c104c64cad8 (diff) | |
download | tk-0bd347649db35a0b43e0a0ba3d443d4f1f9b3d2b.zip tk-0bd347649db35a0b43e0a0ba3d443d4f1f9b3d2b.tar.gz tk-0bd347649db35a0b43e0a0ba3d443d4f1f9b3d2b.tar.bz2 |
more auditing of error codes
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r-- | win/tkWinWm.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c index da65a65..cfa04e1 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -974,7 +974,8 @@ WinSetIcon( if (!(Tk_IsTopLevel(tkw))) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "window \"%s\" isn't a top-level window", Tk_PathName(tkw))); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "TOPLEVEL", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "TOPLEVEL", Tk_PathName(tkw), + NULL); return TCL_ERROR; } if (Tk_WindowId(tkw) == None) { @@ -2854,7 +2855,8 @@ Tk_WmObjCmd( && (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; } @@ -3570,7 +3572,7 @@ WmDeiconifyCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't deiconify %s: the container does not support the request", winPtr->pathName)); - Tcl_SetErrorCode(interp, "TK", "WM", "DEICONIFY", "WHAT", NULL); + Tcl_SetErrorCode(interp, "TK", "WM", "COMMUNICATION", NULL); return TCL_ERROR; } return TCL_OK; @@ -4572,7 +4574,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; @@ -4580,7 +4582,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) { @@ -4651,7 +4653,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); @@ -4812,8 +4814,7 @@ WmOverrideredirectCmd( if (curValue < 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "Container does not support overrideredirect", -1)); - Tcl_SetErrorCode(interp, "TK", "WM", "OVERRIDE_REDIRECT", "WHAT", - NULL); + Tcl_SetErrorCode(interp, "TK", "WM", "COMMUNICATION", NULL); return TCL_ERROR; } } else { @@ -5236,7 +5237,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; } @@ -5350,7 +5351,7 @@ WmStateCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't change state of %s: the container does not support the request", winPtr->pathName)); - Tcl_SetErrorCode(interp, "TK", "WM", "STATE", "WHAT", NULL); + Tcl_SetErrorCode(interp, "TK", "WM", "COMMUNICATION", NULL); return TCL_ERROR; } return TCL_OK; @@ -5370,15 +5371,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; } TkpWmSetState(winPtr, IconicState); @@ -5658,7 +5659,7 @@ WmWithdrawCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't withdraw %s: the container does not support the request", Tcl_GetString(objv[2]))); - Tcl_SetErrorCode(interp, "TK", "WM", "WITHDRAW", "WHAT", NULL); + Tcl_SetErrorCode(interp, "TK", "WM", "COMMUNICATION", NULL); return TCL_ERROR; } } else { |