AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2020.08.10 16:25 "[Tiff] exceptions in TIFFSetField not being caught?", by Paul Hemmer
2020.08.11 00:56 "Re: [Tiff] exceptions in TIFFSetField not being caught?", by Bob Friesenhahn
2020.08.11 05:58 "Re: [Tiff] exceptions in TIFFSetField not being caught?", by Paavo Helde
2020.08.11 11:57 "Re: [Tiff] exceptions in TIFFSetField not being caught?", by Paul Hemmer
2020.08.11 11:56 "Re: [Tiff] exceptions in TIFFSetField not being caught?", by Paul Hemmer
2020.08.11 14:12 "Re: [Tiff] exceptions in TIFFSetField not being caught?", by Bob Friesenhahn

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

Hi,

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?

Thanks