SpECTRE Documentation Coverage Report
Current view: top level - IO/H5 - CheckH5.hpp Hit Total Coverage
Commit: 9ddc33268b29014a4956c8f0c24ca90b397463e1 Lines: 2 2 100.0 %
Date: 2024-04-26 20:00:04
Legend: Lines: hit not hit

          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)

Generated by: LCOV version 1.14