[Cin] openexr error handling
Phyllis Smith
phylsmith2017 at gmail.com
Wed Aug 30 23:15:19 CEST 2023
It compiles and seems to run OK with single test of EXR sequence on Ubuntu
16 and Debian 99 32-bit.
PLEASE see next email in case there is an error.
On Wed, Aug 30, 2023 at 11:30 AM Andrew Randrianasulu <
randrianasulu at gmail.com> wrote:
> According to this page
>
> https://openexr.com/en/latest/ReadingAndWritingImageFiles.html
>
> ====
> You may have noticed that in the example above, there are no explicit
> checks to verify that writing the file actually succeeded. If the
> OpenEXR library detects an error, it throws a C++ exception instead of
> returning a C-style error code. With exceptions, error handling tends
> to be easier to get right than with error return values. For instance,
> a program that calls our writeRgba1() function can handle all possible
> error conditions with a single try/catch block:
>
> 1 try
> 2 {
> 3 writeRgba1 (fileName, pixels, width, height);
> 4 }
> 5 catch (const std::exception &exc)
> 6 {
> 7 std::cerr << exc.what() << std::endl;
> 8 }
>
> =====
>
> I guess this mechanism was not very refined in c++98, so it was not
> used in Cinelerra. Then come I and made EXR one of choices in
> background render (where error handling apparently matters). I hope
> one call per frame will not slow us down much .... and better slower
> than crash?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20230830/7498848b/attachment.htm>
More information about the Cin
mailing list