summaryrefslogtreecommitdiffstats
path: root/generic/tkImage.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/tkImage.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/tkImage.c')
-rw-r--r--generic/tkImage.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tkImage.c b/generic/tkImage.c
index 5fa3671..9cc8738 100644
--- a/generic/tkImage.c
+++ b/generic/tkImage.c
@@ -273,6 +273,7 @@ Tk_ImageObjCmd(
if (typePtr == NULL) {
Tcl_AppendResult(interp, "image type \"", arg, "\" doesn't exist",
NULL);
+ Tcl_SetErrorCode(interp, "TK", "LOOKUP", "IMAGE_TYPE", NULL);
return TCL_ERROR;
}
@@ -306,6 +307,7 @@ Tk_ImageObjCmd(
if (topWin != NULL && winPtr->mainPtr->winPtr == topWin) {
Tcl_AppendResult(interp, "images may not be named the ",
"same as the main window", NULL);
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "SMASH_MAIN", NULL);
return TCL_ERROR;
}
}
@@ -491,6 +493,7 @@ Tk_ImageObjCmd(
alreadyDeleted:
Tcl_AppendResult(interp, "image \"", arg, "\" doesn't exist", NULL);
+ Tcl_SetErrorCode(interp, "TK", "LOOKUP", "IMAGE", NULL);
return TCL_ERROR;
}
@@ -631,6 +634,7 @@ Tk_GetImage(
noSuchImage:
if (interp) {
Tcl_AppendResult(interp, "image \"", name, "\" doesn't exist", NULL);
+ Tcl_SetErrorCode(interp, "TK", "LOOKUP", "IMAGE", NULL);
}
return NULL;
}