16 #error no need to expose this header to Swig
20 #ifndef BORNAGAIN_BASE_UTIL_ASSERT_H
21 #define BORNAGAIN_BASE_UTIL_ASSERT_H
33 #define ASSERT(condition) \
35 std::cerr << "Assertion " << (#condition) << " failed in " << __FILE__ << ", line " \
36 << __LINE__ << std::endl; \
38 throw std::runtime_error("assertion failed ... and we should never get here"); \
45 #define ASSERT(condition) \
47 std::stringstream msg; \
48 msg << "Assertion " << (#condition) << " failed in " << __FILE__ << ", line " << __LINE__; \
49 throw std::runtime_error(msg.str()); \