2020.08.10 16:25 "[Tiff] exceptions in TIFFSetField not being caught?", by Paul Hemmer
My application that uses LibTIFF is a high-speed image capture system.
I'm trying to harden it against disc-access issues (say, failed SSD write or storage disconnects)
My function for writing the file wraps all calls (TIFFOpen, TIFFSetField, TIFWriteScanLine, TIFFClose) within a single try/catch block.
I'm testing various scenarios where I disconnect storage and am finding that if TIFFOpen succeeds but then the storage is disconnected during the write, TIFFSetFields will throw an exception inside tiff.dll rather than my own catch block catching it. I'm using C++ (MSVC17)
I've tried wrapping all LibTIFF calls individually with try/catch blocks and found that still tiff.dll will throw exceptions that my end doesn't catch.
Any thoughts how to properly handle such exceptions?