2020.08.10 16:25 "[Tiff] exceptions in TIFFSetField not being caught?", by Paul Hemmer

2020.08.11 05:58 "Re: [Tiff] exceptions in TIFFSetField not being caught?", by Paavo Helde

As he is using MSVC, it's a safe bet he is seeing low-level Windows structured exceptions (https://en.wikipedia.org/wiki/Microsoft-specific_exception_handling_mechanisms). In principle one could catch them by using special Windows-specific SEH constructs __try and __except. However, there is very little one could do for handling such exceptions as libtiff has not been programmed to work with SEH and the program state would be all messed up at this point. About the only possible thing to do would be to display a message box and terminate the program - which is similar to what happens automatically.

Another option would be to use TIFFClientOpen and provide custom I/O routines which would handle such SEH exceptions internally.

hth

Paavo