AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
June 2004

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2004.06.28 13:18 "Throwing C++ exceptions from custom error handler", by Eric Fieleke
2004.06.29 14:22 "Re: Throwing C++ exceptions from custom error handler", by Eric Fieleke
2004.07.01 14:04 "Re: Throwing C++ exceptions from custom error handler", by Eric Fieleke
2004.07.03 10:30 "Re: Throwing C++ exceptions from custom error handler", by Andrey Kiselev

2004.06.28 13:18 "Throwing C++ exceptions from custom error handler", by Eric Fieleke

I'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