diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-30 09:08:25 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-30 09:08:25 (GMT) |
commit | 40eb05f3d721d92449b771e1c7cfe1a252732a97 (patch) | |
tree | 031f1c2df728052af4573ff7ea91cadf69634adf /generic/tkImgPhoto.c | |
parent | e64497a5bc67ff3b3f39e57700c650c6e7962eea (diff) | |
download | tk-40eb05f3d721d92449b771e1c7cfe1a252732a97.zip tk-40eb05f3d721d92449b771e1c7cfe1a252732a97.tar.gz tk-40eb05f3d721d92449b771e1c7cfe1a252732a97.tar.bz2 |
more auditing of error codes
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r-- | generic/tkImgPhoto.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index db59b86..74ee564 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -565,7 +565,8 @@ ImgPhotoCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "image \"%s\" doesn't exist or is not a photo image", Tcl_GetString(options.name))); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "PHOTO", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "PHOTO", + Tcl_GetString(options.name), NULL); return TCL_ERROR; } Tk_PhotoGetImage(srcHandle, &block); @@ -729,7 +730,7 @@ ImgPhotoCmd( Tcl_GetString(options.format), (matched ? "not supported" : "unknown"))); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "PHOTO_FORMAT", - NULL); + Tcl_GetString(options.format), NULL); return TCL_ERROR; } } else { @@ -2461,7 +2462,8 @@ MatchFileFormat( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "image file format \"%s\" is not supported", formatString)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "PHOTO_FORMAT", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "PHOTO_FORMAT", + formatString, NULL); } else { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "couldn't recognize data in image file \"%s\"", @@ -2586,7 +2588,8 @@ MatchStringFormat( if ((formatObj != NULL) && !matched) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "image format \"%s\" is not supported", formatString)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "PHOTO_FORMAT", NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "PHOTO_FORMAT", + formatString, NULL); } else { Tcl_SetObjResult(interp, Tcl_NewStringObj( "couldn't recognize image data", -1)); |