Go to the documentation of this file. 17 #ifndef __ESCRIPT_ASSERT_H__ 18 #define __ESCRIPT_ASSERT_H__ 37 #include <escript/EsysException.h> 45 #define ESYS_ASSERT(assert_test, assert_msg)\ 47 const bool result = (assert_test);\ 49 std::ostringstream message;\ 50 message << assert_msg << "\n\n"\ 51 << __FILE__ << ":" << __LINE__ << ": " << #assert_test << "\n";\ 52 std::cerr << message.str();\ 53 MPI_Abort(MPI_COMM_WORLD, 455347);\ 59 #define ESYS_ASSERT(assert_test, assert_msg)\ 61 const bool result = (assert_test);\ 63 std::ostringstream message;\ 64 message << assert_msg << "\n\n"\ 65 << __FILE__ << ":" << __LINE__ << ": " << #assert_test << "\n";\ 66 throw escript::AssertException(message.str());\ 78 #define ESYS_ASSERT(a,b) 82 #endif // __ESCRIPT_ASSERT_H__