summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixEmbed.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-07-30 07:46:19 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-07-30 07:46:19 (GMT)
commite64497a5bc67ff3b3f39e57700c650c6e7962eea (patch)
tree7e57204b12abc171ad343d007edecaf1b17cdf09 /unix/tkUnixEmbed.c
parent488df4eea56d73f306245cf3cebedcc0e25038b6 (diff)
downloadtk-e64497a5bc67ff3b3f39e57700c650c6e7962eea.zip
tk-e64497a5bc67ff3b3f39e57700c650c6e7962eea.tar.gz
tk-e64497a5bc67ff3b3f39e57700c650c6e7962eea.tar.bz2
Working towards making the error codes more consistent.
Diffstat (limited to 'unix/tkUnixEmbed.c')
-rw-r--r--unix/tkUnixEmbed.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/unix/tkUnixEmbed.c b/unix/tkUnixEmbed.c
index d94157c..8a4c368 100644
--- a/unix/tkUnixEmbed.c
+++ b/unix/tkUnixEmbed.c
@@ -121,14 +121,12 @@ TkpUseWindow(
parent = (Window) id;
usePtr = (TkWindow *) Tk_IdToWindow(winPtr->display, parent);
- if (usePtr != NULL) {
- if (!(usePtr->flags & TK_CONTAINER)) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "window \"%s\" doesn't have -container option set",
- usePtr->pathName));
- Tcl_SetErrorCode(interp, "TK", "EMBED", "CONTAINER", NULL);
- return TCL_ERROR;
- }
+ if (usePtr != NULL && !(usePtr->flags & TK_CONTAINER)) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "window \"%s\" doesn't have -container option set",
+ usePtr->pathName));
+ Tcl_SetErrorCode(interp, "TK", "EMBED", "CONTAINER", NULL);
+ return TCL_ERROR;
}
/*
@@ -150,7 +148,7 @@ TkpUseWindow(
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"couldn't create child of window \"%s\"", string));
- Tcl_SetErrorCode(interp, "TK", "EMBED", "CHILD", NULL);
+ Tcl_SetErrorCode(interp, "TK", "EMBED", "NO_TARGET", NULL);
}
return TCL_ERROR;
}