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 | 0bd347649db35a0b43e0a0ba3d443d4f1f9b3d2b (patch) | |
tree | 031f1c2df728052af4573ff7ea91cadf69634adf /generic/tkImgPhoto.c | |
parent | ca5623894dd113cd5642189574cf6c104c64cad8 (diff) | |
download | tk-0bd347649db35a0b43e0a0ba3d443d4f1f9b3d2b.zip tk-0bd347649db35a0b43e0a0ba3d443d4f1f9b3d2b.tar.gz tk-0bd347649db35a0b43e0a0ba3d443d4f1f9b3d2b.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)); |