summaryrefslogtreecommitdiffstats
path: root/generic/tk3d.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tk3d.c')
-rw-r--r--generic/tk3d.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/generic/tk3d.c b/generic/tk3d.c
index 2920c76..dd7ab2f 100644
--- a/generic/tk3d.c
+++ b/generic/tk3d.c
@@ -673,11 +673,10 @@ Tk_GetRelief(
} else if ((c == 's') && (strncmp(name, "sunken", length) == 0)) {
*reliefPtr = TK_RELIEF_SUNKEN;
} else {
- char buf[200];
-
- sprintf(buf, "bad relief \"%.50s\": must be %s",
- name, "flat, groove, raised, ridge, solid, or sunken");
- Tcl_SetResult(interp, buf, TCL_VOLATILE);
+ Tcl_SetObjResult(interp,
+ Tcl_ObjPrintf("bad relief \"%.50s\": must be %s",
+ name, "flat, groove, raised, ridge, solid, or sunken"));
+ Tcl_SetErrorCode(interp, "TK", "VALUE", "RELIEF", NULL);
return TCL_ERROR;
}
return TCL_OK;