Re: logic error
Bob Friesenhahn <[email protected]> Fri, 19 Aug 2011 09:04:10 -0500 (CDT)
| Newsgroups | gmane.comp.video.graphicsmagick.apis |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 19 Aug 2011, [email protected] wrote: > > The code that performs this begins at line ~5408 in > magick/display.c. Unfortunately, it appears the renaming of the file > is carried out in a separate function, in a clone of the ImageInfo, > and this work will never get back to the scope that emits the error msg. > > Without a larger overhaul, do you think skipping the politeness of > returning the (potentially incorrect) filename could be skipped from > the error msg? I will take a look at what can be done. Obviously any error message should reflect the path which was (attempted to be) written to and the reason for the falure, rather than the source source image name. As you say, it make take some exploring to find the best way to retrieve the correct error. It seems likely that the ExceptionInfo struct accessed like (*image)->exception_info contains the best information. Running the software with the MAGICK_DEBUG variable set to 'exception' will reveal the actual underlying exceptions which are thrown: % MAGICK_DEBUG=exception gm display seaworld.jpg& [1] 26085 freddy:~% 08:53:35 0:27 0.210u 26085 blob.c/OpenBlob/3485/FileOpen: Unable to open file (/blah/seaworld.jpg) 08:53:35 0:27 0.210u 26085 jpeg.c/WriteJPEGImage/1738/FileOpen: Unable to open file (/blah/seaworld.jpg) % MAGICK_DEBUG=exception gm display seaworld.pbm& [1] 26092 % 08:55:13 0:26 0.180u 26092 blob.c/OpenBlob/3485/FileOpen: Unable to open file (/blah/seaworld.pbm) 08:55:13 0:26 0.180u 26092 pnm.c/WritePNMImage/1293/FileOpen: Unable to open file (/blah/seaworld.pbm) Would you be happier if the notification window said "Unable to open file (/blah/seaworld.pbm)" rather than the file name? Bob -- Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2