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 | 40eb05f3d721d92449b771e1c7cfe1a252732a97 (patch) | |
tree | 031f1c2df728052af4573ff7ea91cadf69634adf /generic/tkCmds.c | |
parent | e64497a5bc67ff3b3f39e57700c650c6e7962eea (diff) | |
download | tk-40eb05f3d721d92449b771e1c7cfe1a252732a97.zip tk-40eb05f3d721d92449b771e1c7cfe1a252732a97.tar.gz tk-40eb05f3d721d92449b771e1c7cfe1a252732a97.tar.bz2 |
more auditing of error codes
Diffstat (limited to 'generic/tkCmds.c')
-rw-r--r-- | generic/tkCmds.c | 10 |
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; } |