diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkBind.c | 3 | ||||
-rw-r--r-- | generic/tkBitmap.c | 3 | ||||
-rw-r--r-- | generic/tkBusy.c | 3 | ||||
-rw-r--r-- | generic/tkCanvUtil.c | 3 | ||||
-rw-r--r-- | generic/tkCanvas.c | 9 | ||||
-rw-r--r-- | generic/tkCmds.c | 10 | ||||
-rw-r--r-- | generic/tkGrid.c | 17 | ||||
-rw-r--r-- | generic/tkImage.c | 6 | ||||
-rw-r--r-- | generic/tkImgPhoto.c | 11 | ||||
-rw-r--r-- | generic/tkPack.c | 2 | ||||
-rw-r--r-- | generic/tkPanedWindow.c | 9 | ||||
-rw-r--r-- | generic/tkText.c | 10 | ||||
-rw-r--r-- | generic/tkTextIndex.c | 9 | ||||
-rw-r--r-- | generic/tkTextMark.c | 8 | ||||
-rw-r--r-- | generic/tkTextTag.c | 3 | ||||
-rw-r--r-- | generic/tkTrig.c | 2 | ||||
-rw-r--r-- | generic/tkWindow.c | 5 | ||||
-rw-r--r-- | generic/ttk/ttkLayout.c | 4 | ||||
-rw-r--r-- | generic/ttk/ttkPanedwindow.c | 2 | ||||
-rw-r--r-- | generic/ttk/ttkState.c | 2 | ||||
-rw-r--r-- | generic/ttk/ttkTheme.c | 10 |
21 files changed, 70 insertions, 61 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c index 974c1f9..4029571 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -3951,7 +3951,8 @@ ParseEventDescription( if (patPtr->detail.keySym == NoSymbol) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad event type or keysym \"%s\"", field)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "KEYSYM", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "KEYSYM", field, + NULL); count = 0; goto done; } diff --git a/generic/tkBitmap.c b/generic/tkBitmap.c index 0815b3b..729fff4 100644 --- a/generic/tkBitmap.c +++ b/generic/tkBitmap.c @@ -389,7 +389,8 @@ GetBitmap( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bitmap \"%s\" not defined", string)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "BITMAP", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "BITMAP", string, + NULL); } goto error; } diff --git a/generic/tkBusy.c b/generic/tkBusy.c index 8fd53fa..8f73d80 100644 --- a/generic/tkBusy.c +++ b/generic/tkBusy.c @@ -689,7 +689,8 @@ GetBusy( if (hPtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't find busy window \"%s\"", Tcl_GetString(windowObj))); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "BUSY", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "BUSY", + Tcl_GetString(windowObj), NULL); return NULL; } return Tcl_GetHashValue(hPtr); diff --git a/generic/tkCanvUtil.c b/generic/tkCanvUtil.c index 120afd2..23c73e5 100644 --- a/generic/tkCanvUtil.c +++ b/generic/tkCanvUtil.c @@ -772,7 +772,8 @@ TkSmoothParseProc( if (smooth != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "ambiguous smooth method \"%s\"", value)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "SMOOTH", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "SMOOTH", value, + NULL); return TCL_ERROR; } smooth = &methods->smooth; diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index d6b6959..07f1cfe 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -930,7 +930,8 @@ CanvasWidgetCmd( if (object == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "item \"%s\" doesn't exist", Tcl_GetString(objv[2]))); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "CANVASITEM", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "CANVAS_ITEM", + Tcl_GetString(objv[2]), NULL); result = TCL_ERROR; goto done; } @@ -956,7 +957,8 @@ CanvasWidgetCmd( if (object == 0) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "item \"%s\" doesn't exist", Tcl_GetString(objv[2]))); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "CANVASITEM", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "CANVAS_ITEM", + Tcl_GetString(objv[2]), NULL); result = TCL_ERROR; goto done; } @@ -1278,7 +1280,8 @@ CanvasWidgetCmd( badType: Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown or ambiguous item type \"%s\"", arg)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "CANVASITEM", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "CANVAS_ITEM_TYPE", arg, + NULL); result = TCL_ERROR; goto done; } 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; } diff --git a/generic/tkGrid.c b/generic/tkGrid.c index c11d342..19e4442 100644 --- a/generic/tkGrid.c +++ b/generic/tkGrid.c @@ -1015,9 +1015,8 @@ GridRowColumnConfigureCommand( if ((objc == 4) || (objc == 5)) { if (lObjc != 1) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "%s %s: must specify a single element on retrieval", - Tcl_GetString(objv[0]), Tcl_GetString(objv[1]))); + Tcl_SetObjResult(interp, Tcl_NewStringObj( + "must specify a single element on retrieval", -1)); Tcl_SetErrorCode(interp, "TK", "GRID", "USAGE", NULL); Tcl_DecrRefCount(listCopy); return TCL_ERROR; @@ -1129,18 +1128,15 @@ GridRowColumnConfigureCommand( slavePtr = GetGrid(slave); if (slavePtr->masterPtr != masterPtr) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "%s %s: the window \"%s\" is not managed by \"%s\"", - Tcl_GetString(objv[0]), Tcl_GetString(objv[1]), + "the window \"%s\" is not managed by \"%s\"", Tcl_GetString(lObjv[j]), Tcl_GetString(objv[2]))); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "GRID_MASTER", NULL); + Tcl_SetErrorCode(interp, "TK", "GRID", "NOT_MASTER", NULL); Tcl_DecrRefCount(listCopy); return TCL_ERROR; } } else { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "%s %s: illegal index \"%s\"", - Tcl_GetString(objv[0]), Tcl_GetString(objv[1]), - Tcl_GetString(lObjv[j]))); + "illegal index \"%s\"", Tcl_GetString(lObjv[j]))); Tcl_SetErrorCode(interp, "TK", "VALUE", "GRID_INDEX", NULL); Tcl_DecrRefCount(listCopy); return TCL_ERROR; @@ -1162,8 +1158,7 @@ GridRowColumnConfigureCommand( ok = CheckSlotData(masterPtr, slot, slotType, /*checkOnly*/ 0); if (ok != TCL_OK) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "%s %s: \"%s\" is out of range", - Tcl_GetString(objv[0]), Tcl_GetString(objv[1]), + "\"%s\" is out of range", Tcl_GetString(lObjv[j]))); Tcl_SetErrorCode(interp, "TK", "GRID", "INDEX_RANGE", NULL); diff --git a/generic/tkImage.c b/generic/tkImage.c index bb115f6..ffa6f22 100644 --- a/generic/tkImage.c +++ b/generic/tkImage.c @@ -274,7 +274,7 @@ Tk_ImageObjCmd( if (typePtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "image type \"%s\" doesn't exist", arg)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "IMAGE_TYPE", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "IMAGE_TYPE", arg, NULL); return TCL_ERROR; } @@ -500,7 +500,7 @@ Tk_ImageObjCmd( alreadyDeleted: Tcl_SetObjResult(interp, Tcl_ObjPrintf("image \"%s\" doesn't exist",arg)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "IMAGE", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "IMAGE", arg, NULL); return TCL_ERROR; } @@ -642,7 +642,7 @@ Tk_GetImage( if (interp) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "image \"%s\" doesn't exist", name)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "IMAGE", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "IMAGE", name, NULL); } return NULL; } diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index db59b86..74ee564 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -565,7 +565,8 @@ ImgPhotoCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "image \"%s\" doesn't exist or is not a photo image", Tcl_GetString(options.name))); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "PHOTO", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "PHOTO", + Tcl_GetString(options.name), NULL); return TCL_ERROR; } Tk_PhotoGetImage(srcHandle, &block); @@ -729,7 +730,7 @@ ImgPhotoCmd( Tcl_GetString(options.format), (matched ? "not supported" : "unknown"))); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "PHOTO_FORMAT", - NULL); + Tcl_GetString(options.format), NULL); return TCL_ERROR; } } else { @@ -2461,7 +2462,8 @@ MatchFileFormat( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "image file format \"%s\" is not supported", formatString)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "PHOTO_FORMAT", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "PHOTO_FORMAT", + formatString, NULL); } else { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "couldn't recognize data in image file \"%s\"", @@ -2586,7 +2588,8 @@ MatchStringFormat( if ((formatObj != NULL) && !matched) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "image format \"%s\" is not supported", formatString)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "PHOTO_FORMAT", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "PHOTO_FORMAT", + formatString, NULL); } else { Tcl_SetObjResult(interp, Tcl_NewStringObj( "couldn't recognize image data", -1)); diff --git a/generic/tkPack.c b/generic/tkPack.c index c600f34..d91fda7 100644 --- a/generic/tkPack.c +++ b/generic/tkPack.c @@ -301,7 +301,7 @@ Tk_PackObjCmd( if (argv2[0] != '.') { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad argument \"%s\": must be name of window", argv2)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "WINDOW", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "WINDOW_PATH", NULL); return TCL_ERROR; } return ConfigureSlaves(interp, tkwin, objc-2, objv+2); diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index b6080b1..4a4af53 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -662,7 +662,8 @@ PanedWindowWidgetObjCmd( if (i == pwPtr->numSlaves) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "not managed by this window", -1)); - Tcl_SetErrorCode(interp, "TK", "PANEDWIN", "UNMANAGED", NULL); + Tcl_SetErrorCode(interp, "TK", "PANEDWINDOW", "UNMANAGED", + NULL); } result = TCL_ERROR; } else { @@ -1102,7 +1103,7 @@ PanedWindowSashCommand( if (!ValidSashIndex(pwPtr, sash)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "invalid sash index", -1)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "SASH_IDX", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "SASH_INDEX", NULL); return TCL_ERROR; } slavePtr = pwPtr->slaves[sash]; @@ -1125,7 +1126,7 @@ PanedWindowSashCommand( if (!ValidSashIndex(pwPtr, sash)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "invalid sash index", -1)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "SASH_IDX", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "SASH_INDEX", NULL); return TCL_ERROR; } @@ -1161,7 +1162,7 @@ PanedWindowSashCommand( if (!ValidSashIndex(pwPtr, sash)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "invalid sash index", -1)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "SASH_IDX", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "SASH_INDEX", NULL); return TCL_ERROR; } diff --git a/generic/tkText.c b/generic/tkText.c index 0970794..e7b1c4d 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -1039,7 +1039,7 @@ TextWidgetObjCmd( "bad option \"%s\" must be -chars, -displaychars, " "-displayindices, -displaylines, -indices, -lines, -update, " "-xpixels, or -ypixels", Tcl_GetString(objv[i]))); - Tcl_SetErrorCode(interp, "TK", "VALUE", "INDEXOPT", NULL); + Tcl_SetErrorCode(interp, "TK", "TEXT", "INDEX_OPTION", NULL); result = TCL_ERROR; goto done; } @@ -1403,7 +1403,7 @@ TextWidgetObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "index \"%s\" before \"%s\" in the text", Tcl_GetString(objv[3]), Tcl_GetString(objv[2]))); - Tcl_SetErrorCode(interp, "TK", "TEXT", "INDEXORDER", NULL); + Tcl_SetErrorCode(interp, "TK", "TEXT", "INDEX_ORDER", NULL); result = TCL_ERROR; goto done; } @@ -2066,7 +2066,7 @@ ConfigureText( if (start > end) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "-startline must be less than or equal to -endline", -1)); - Tcl_SetErrorCode(interp, "TK", "TEXT", "INDEXORDER", NULL); + Tcl_SetErrorCode(interp, "TK", "TEXT", "INDEX_ORDER", NULL); Tk_RestoreSavedOptions(&savedOptions); return TCL_ERROR; } @@ -4421,7 +4421,7 @@ TkTextGetTabs( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "tab stop \"%s\" is not at a positive distance", Tcl_GetString(objv[i]))); - Tcl_SetErrorCode(interp, "TK", "VALUE", "TABSTOP", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "TAB_STOP", NULL); goto error; } @@ -4455,7 +4455,7 @@ TkTextGetTabs( "tabs must be monotonically increasing, but \"%s\" is " "smaller than or equal to the previous tab", Tcl_GetString(objv[i]))); - Tcl_SetErrorCode(interp, "TK", "VALUE", "TABSTOP", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "TAB_STOP", NULL); goto error; #endif /* _TK_ALLOW_DECREASING_TABS */ } diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c index b04eef2..25888d8 100644 --- a/generic/tkTextIndex.c +++ b/generic/tkTextIndex.c @@ -832,15 +832,14 @@ GetIndex( if (!TkBTreeCharTagged(&first, tagPtr) && !TkBTreeNextTag(&search)) { if (tagPtr == textPtr->selTagPtr) { tagName = "sel"; - } else { - if (hPtr != NULL) { - tagName = Tcl_GetHashKey(&sharedPtr->tagTable, hPtr); - } + } else if (hPtr != NULL) { + tagName = Tcl_GetHashKey(&sharedPtr->tagTable, hPtr); } Tcl_SetObjResult(interp, Tcl_ObjPrintf( "text doesn't contain any characters tagged with \"%s\"", tagName)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "TEXT_INDEX", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "TEXT_INDEX", tagName, + NULL); Tcl_DStringFree(©); return TCL_ERROR; } diff --git a/generic/tkTextMark.c b/generic/tkTextMark.c index 77cf2c5..a306a05 100644 --- a/generic/tkTextMark.c +++ b/generic/tkTextMark.c @@ -133,7 +133,7 @@ TkTextMarkCmd( Tcl_WrongNumArgs(interp, 3, objv, "markName ?gravity?"); return TCL_ERROR; } - str = Tcl_GetStringFromObj(objv[3],&length); + str = Tcl_GetStringFromObj(objv[3], &length); if (length == 6 && !strcmp(str, "insert")) { markPtr = textPtr->insertMarkPtr; } else if (length == 7 && !strcmp(str, "current")) { @@ -142,9 +142,9 @@ TkTextMarkCmd( hPtr = Tcl_FindHashEntry(&textPtr->sharedTextPtr->markTable, str); if (hPtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "there is no mark named \"%s\"", - Tcl_GetString(objv[3]))); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "TEXT_MARK", NULL); + "there is no mark named \"%s\"", str)); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "TEXT_MARK", str, + NULL); return TCL_ERROR; } markPtr = Tcl_GetHashValue(hPtr); diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c index 19ea5f3..fb514bf 100644 --- a/generic/tkTextTag.c +++ b/generic/tkTextTag.c @@ -1073,7 +1073,8 @@ FindTag( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "tag \"%s\" isn't defined in text widget", Tcl_GetString(tagName))); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "TEXT_TAG", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "TEXT_TAG", + Tcl_GetString(tagName), NULL); } return NULL; } diff --git a/generic/tkTrig.c b/generic/tkTrig.c index 3da1e5c..a2bf456 100644 --- a/generic/tkTrig.c +++ b/generic/tkTrig.c @@ -1375,7 +1375,6 @@ TkMakeBezierPostscript( int closed, i; int numCoords = numPoints*2; double control[8]; - char buffer[200]; Tcl_Obj *psObj; /* @@ -1477,7 +1476,6 @@ TkMakeRawCurvePostscript( { int i; double *segPtr; - char buffer[200]; Tcl_Obj *psObj; /* diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 8b39da1..4e39d6e 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -1185,7 +1185,7 @@ Tk_CreateWindowFromPath( if (p == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad window path name \"%s\"", pathName)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "WINDOWPATH", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "WINDOW_PATH", NULL); return NULL; } numChars = (int) (p-pathName); @@ -2351,7 +2351,8 @@ Tk_NameToWindow( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad window path name \"%s\"", pathName)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "WINDOWNAME", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "WINDOW", pathName, + NULL); } return NULL; } diff --git a/generic/ttk/ttkLayout.c b/generic/ttk/ttkLayout.c index 559d5d9..15ceaa8 100644 --- a/generic/ttk/ttkLayout.c +++ b/generic/ttk/ttkLayout.c @@ -878,7 +878,7 @@ Ttk_Layout Ttk_CreateLayout( if (!layoutTemplate) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "Layout %s not found", styleName)); - Tcl_SetErrorCode(interp, "TTK", "LOOKUP", "LAYOUT", NULL); + Tcl_SetErrorCode(interp, "TTK", "LOOKUP", "LAYOUT", styleName, NULL); return 0; } @@ -919,7 +919,7 @@ Ttk_CreateSublayout( if (!layoutTemplate) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "Layout %s not found", styleName)); - Tcl_SetErrorCode(interp, "TTK", "LOOKUP", "LAYOUT", NULL); + Tcl_SetErrorCode(interp, "TTK", "LOOKUP", "LAYOUT", styleName, NULL); return 0; } diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c index 12d481f..f4b14c9 100644 --- a/generic/ttk/ttkPanedwindow.c +++ b/generic/ttk/ttkPanedwindow.c @@ -848,7 +848,7 @@ static int PanedSashposCommand( if (sashIndex < 0 || sashIndex >= Ttk_NumberSlaves(pw->paned.mgr) - 1) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "sash index %d out of range", sashIndex)); - Tcl_SetErrorCode(interp, "TTK", "PANE", "SASHIDX", NULL); + Tcl_SetErrorCode(interp, "TTK", "PANE", "SASH_INDEX", NULL); return TCL_ERROR; } diff --git a/generic/ttk/ttkState.c b/generic/ttk/ttkState.c index 151dc4d..c34b900 100644 --- a/generic/ttk/ttkState.c +++ b/generic/ttk/ttkState.c @@ -218,7 +218,7 @@ Tcl_Obj *Ttk_StateMapLookup( } if (interp) { Tcl_SetObjResult(interp, Tcl_NewStringObj("No match in state map", -1)); - Tcl_SetErrorCode(interp, "TTK", "LOOKUP", "STATE", NULL); + Tcl_SetErrorCode(interp, "TTK", "STATE", "UNMATCHED", NULL); } return NULL; } diff --git a/generic/ttk/ttkTheme.c b/generic/ttk/ttkTheme.c index 6e7b477..5097abc 100644 --- a/generic/ttk/ttkTheme.c +++ b/generic/ttk/ttkTheme.c @@ -594,7 +594,7 @@ static Ttk_Theme LookupTheme( if (!entryPtr) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "theme \"%s\" doesn't exist", name)); - Tcl_SetErrorCode(interp, "TTK", "LOOKUP", "THEME", NULL); + Tcl_SetErrorCode(interp, "TTK", "LOOKUP", "THEME", name, NULL); return NULL; } @@ -1499,7 +1499,8 @@ static int StyleElementCreateCmd( if (!entryPtr) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "No such element type %s", factoryName)); - Tcl_SetErrorCode(interp, "TTK", "LOOKUP", "ELEMENT_TYPE", NULL); + Tcl_SetErrorCode(interp, "TTK", "LOOKUP", "ELEMENT_TYPE", factoryName, + NULL); return TCL_ERROR; } @@ -1560,7 +1561,7 @@ static int StyleElementOptionsCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "element %s not found", elementName)); - Tcl_SetErrorCode(interp, "TTK", "LOOKUP", "ELEMENT", NULL); + Tcl_SetErrorCode(interp, "TTK", "LOOKUP", "ELEMENT", elementName, NULL); return TCL_ERROR; } @@ -1586,7 +1587,8 @@ static int StyleLayoutCmd( if (!layoutTemplate) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "Layout %s not found", layoutName)); - Tcl_SetErrorCode(interp, "TTK", "LOOKUP", "LAYOUT", NULL); + Tcl_SetErrorCode(interp, "TTK", "LOOKUP", "LAYOUT", layoutName, + NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, Ttk_UnparseLayoutTemplate(layoutTemplate)); |