dune-grid  2.11
errors.hh
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file AUTHORS.md
2 // SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception OR LGPL-3.0-or-later
3 
4 #ifndef DUNE_GRID_IO_FILE_GMSH_UTILITY_ERRORS_HH
5 #define DUNE_GRID_IO_FILE_GMSH_UTILITY_ERRORS_HH
6 
7 #include <dune/common/exceptions.hh>
8 
14 namespace Dune::Impl::Gmsh
15 {
16 
17  class Gmsh4Error : public Exception {};
18 
19 }
20 
24 #define GMSH4_ASSERT_MSG(cond, text) \
25  do { \
26  if (!(cond)) \
27  DUNE_THROW(Dune::Impl::Gmsh::Gmsh4Error, text); \
28  } while (false)
29 
30 
34 #define GMSH4_ASSERT(cond) \
35  do { \
36  if (!(cond)) \
37  DUNE_THROW(Dune::Impl::Gmsh::Gmsh4Error, #cond); \
38  } while (false)
39 
40 #endif
Definition: filereader.hh:14