dune-grid  2.11
Macros
errors.hh File Reference

Macro for wrapping error checks and throwing exceptions. More...

#include <dune/common/exceptions.hh>

Go to the source code of this file.

Macros

#define GMSH4_ASSERT_MSG(cond, text)
 check if condition cond holds; otherwise, throw a Gmsh4Error with a message. More...
 
#define GMSH4_ASSERT(cond)
 check if condition cond holds; otherwise, throw a Gmsh4Error. More...
 

Detailed Description

Macro for wrapping error checks and throwing exceptions.

Macro Definition Documentation

◆ GMSH4_ASSERT

#define GMSH4_ASSERT (   cond)
Value:
do { \
if (!(cond)) \
DUNE_THROW(Dune::Impl::Gmsh::Gmsh4Error, #cond); \
} while (false)

check if condition cond holds; otherwise, throw a Gmsh4Error.

◆ GMSH4_ASSERT_MSG

#define GMSH4_ASSERT_MSG (   cond,
  text 
)
Value:
do { \
if (!(cond)) \
DUNE_THROW(Dune::Impl::Gmsh::Gmsh4Error, text); \
} while (false)

check if condition cond holds; otherwise, throw a Gmsh4Error with a message.