| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2004.06.28 13:18 "Throwing C++ exceptions from custom error handler", by Eric FielekeI've written a thin C++ wrapper around 3.6.1 tifflib, primarily because I'd like to coerce it to throw C++ exceptions when library methods fail. What I'm doing is passing a function to TIFFSetErrorHandler that constructs and throws a C++ exception. I have a few questions about this: * Is it guaranteed that any time a TIFF library method fails that the error handler will get called? * Is it guaranteed that any time a TIFF library method succeeds that the error handler will NOT get called? * Is allocated memory always cleaned up before the library calls the error handler method (i.e. will there be leaks if I throw an exception from within the error handler)? If it's not, I could throw exceptions after testing the return code from the TIFF library methods rather than from within the error handler method. * Am I reinventing the wheel? Is there a well-tested, publicly available and free C++ wrapper for tifflib? Thanks for your help. Eric Fieleke |
|||||||