Line data Source code
1 1 : // Distributed under the MIT License. 2 : // See LICENSE.txt for details. 3 : 4 : /// \file 5 : /// Defines macro CHECK_H5 6 : 7 : #pragma once 8 : 9 : #include "Utilities/ErrorHandling/Error.hpp" 10 : 11 : /*! 12 : * \ingroup HDF5Group 13 : * \brief Check if an HDF5 operation was successful 14 : * 15 : * \requires `h5_status` is a valid HDF5 return type, `m` is a stringstream 16 : * syntax error message. 17 : * 18 : * \effects if `h5_status` is set to error then aborts execution else none 19 : */ 20 1 : #define CHECK_H5(h5_status, m) \ 21 : if (h5_status < 0) { /*NOLINT*/ \ 22 : ERROR("Failed HDF5 operation: " << m); /*NOLINT*/ \ 23 : } else \ 24 : static_cast<void>(0)