Open ax3l opened 5 years ago
I do not have an easy way to fix now, but the destructors call flush_attribute()
containing this line, not sure if it is the only violator.
Edit: I mean, ofc that call or even the whole bodies of the destructors in question could be put to try-catch
, if that counts as a solution.
Yes, there are several solutions for that. FWIW, the PHDF5 backend destructor solves the same problem gracefully, e.g. by writing to std::cerr
instead of throwing.
Describe the bug Destructors may not fail in clean C++, which otherwise makes object destruction and associated resource occupation unreliable. Also given by C++ core guidelines.
To Reproduce Compile the project with clang-tidy-7 or newer with enabled ADIOS1 backend. The warning
bugprone-exception-escape
will be visible inParallelADIOS1IOHandlerImpl::~ParallelADIOS1IOHandlerImpl()
(src/IO/ADIOS/ParallelADIOS1IOHandler.cpp
) andADIOS1IOHandlerImpl::~ADIOS1IOHandlerImpl()
(src/IO/ADIOS/ADIOS1IOHandler.cpp
).Example:
Expected behavior A clear and concise description of what you expected to happen.
Software Environment
0.9.0-alpha-18-g0bf8862