From: Lutz <lu...@us...> - 2004-05-20 11:02:04
|
On Tue, 2004-05-18 at 13:51, Joerg Hoh wrote: > I think at this moment it would be easier to > work with return values. The errors I want to catch with this approach are > relativly "simple" errors like error return values of libc-calls (malloc, > realloc) and possibly invalid (NULL) arguments. Look at the points in > functions where at this moment we just do a simple "return". Most times > it's enough to distinct between "error occured" and "no error". I had an hour to play with libexif and came up with a proposal for debugging messages (exif-log.[c,h], try exif --debug non_existing_file.jpg). API didn't change. But now you have the possibility to watch what is going on internally using a callback-function. While thinking about how that could be used to satisfy your needs, I ran out of ideas regarding the following question: At which point does an invalid argument or a failed malloc become fatal? At libexif level? At the maker note level? I don't think a bug in the maker note code should let the loading of the ExifData fail. There seems to never be a 1/0-decision. Regards Lutz |