dune-grid 2.11
Loading...
Searching...
No Matches
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.

Namespaces

namespace  Dune
 Include standard header files.

Macros

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

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.