summaryrefslogtreecommitdiffstats
path: root/generic/tk3d.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-07-16 12:36:40 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-07-16 12:36:40 (GMT)
commitf4db69f3300fe5cdb3da35c67bf608674950a72c (patch)
tree83188d92aa77a52a178e0ae85ba5439c402f4eca /generic/tk3d.c
parent8f22ecfac96ac10f3c1aa3df10a10071ed591d9b (diff)
downloadtk-f4db69f3300fe5cdb3da35c67bf608674950a72c.zip
tk-f4db69f3300fe5cdb3da35c67bf608674950a72c.tar.gz
tk-f4db69f3300fe5cdb3da35c67bf608674950a72c.tar.bz2
Working towards adding all the Tcl_SetErrorCode calls that should be there.
** WORK IN PROGRESS **
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;