summaryrefslogtreecommitdiffstats
path: root/generic/tkImgBmap.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/tkImgBmap.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/tkImgBmap.c')
-rw-r--r--generic/tkImgBmap.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c
index 82374cb..a08bb8f 100644
--- a/generic/tkImgBmap.c
+++ b/generic/tkImgBmap.c
@@ -279,6 +279,8 @@ ImgBmapConfigureMaster(
if (masterPtr->data == NULL) {
Tcl_SetResult(masterPtr->interp, "can't have mask without bitmap",
TCL_STATIC);
+ Tcl_SetErrorCode(masterPtr->interp, "TK", "IMAGE", "BITMAP",
+ "NO_BITMAP", NULL);
return TCL_ERROR;
}
masterPtr->maskData = TkGetBitmapData(masterPtr->interp,
@@ -293,6 +295,8 @@ ImgBmapConfigureMaster(
masterPtr->maskData = NULL;
Tcl_SetResult(masterPtr->interp,
"bitmap and mask have different sizes", TCL_STATIC);
+ Tcl_SetErrorCode(masterPtr->interp, "TK", "IMAGE", "BITMAP",
+ "MASK_SIZE", NULL);
return TCL_ERROR;
}
}
@@ -492,6 +496,7 @@ TkGetBitmapData(
if ((interp != NULL) && Tcl_IsSafe(interp)) {
Tcl_AppendResult(interp, "can't get bitmap data from a file in a",
" safe interpreter", NULL);
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "BITMAP", "SAFE", NULL);
return NULL;
}
expandedFileName = Tcl_TranslateFileName(interp, fileName, &buffer);
@@ -595,6 +600,8 @@ TkGetBitmapData(
if (interp != NULL) {
Tcl_AppendResult(interp, "format error in bitmap data; ",
"looks like it's an obsolete X10 bitmap file", NULL);
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "BITMAP", "OBSOLETE",
+ NULL);
}
goto errorCleanup;
}
@@ -637,6 +644,7 @@ TkGetBitmapData(
error:
if (interp != NULL) {
Tcl_SetResult(interp, "format error in bitmap data", TCL_STATIC);
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "BITMAP", "FORMAT", NULL);
}
errorCleanup:
@@ -1154,6 +1162,7 @@ ImgBmapPsImagemask(
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, "unable to generate postscript for bitmaps "
"larger than 60000 pixels", NULL);
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "BITMAP", "OUTSIZE", NULL);
return TCL_ERROR;
}