summaryrefslogtreecommitdiffstats
path: root/generic/tkStyle.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkStyle.c')
-rw-r--r--generic/tkStyle.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tkStyle.c b/generic/tkStyle.c
index 76291fa..d5e1407 100644
--- a/generic/tkStyle.c
+++ b/generic/tkStyle.c
@@ -1356,8 +1356,9 @@ Tk_GetStyle(
entryPtr = Tcl_FindHashEntry(&tsdPtr->styleTable, (name!=NULL?name:""));
if (entryPtr == NULL) {
if (interp != NULL) {
- Tcl_AppendResult(interp, "style \"", name, "\" doesn't exist",
- NULL);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "style \"%s\" doesn't exist", name));
+ Tcl_SetErrorCode(interp, "TK", "LOOKUP", "STYLE", name, NULL);
}
return (Tk_Style) NULL;
}