CheckH5.hpp
Go to the documentation of this file.
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 
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 #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)
Defines macro ERROR.