33 #ifndef __H__COMMON__ASSERT__
34 #define __H__COMMON__ASSERT__
43 #define UG_TO_STRING1(x) #x
44 #define UG_TO_STRING(x) UG_TO_STRING1(x)
70 #define UG_ASSERT(expr, msg) {if(!(expr)) \
72 UG_LOG_ALL_PROCS( "\n UG_ASSERT failed:\n"\
73 " Condition: " << UG_TO_STRING(expr) << "\n"\
74 " Description: " << msg << "\n"\
75 " File: " << __FILE__ << "\n"\
76 " Line: " << __LINE__ << "\n\n"); \
78 UG_LOG_ALL_PROCS( "\n UG_ASSERT failed:\n"\
79 " Condition: " << UG_TO_STRING(expr) << "\n"\
80 " Description: " << msg << "\n"\
81 " File: " << __FILE__ << "\n"\
82 " Line: " << __LINE__ << "\n\n"); \
86 #define UG_ASSERT(expr, msg) {}
#define UG_API
Definition: ug_config.h:65
UG_API void ug_assert_failed()
Checks an expression at runtime and raises a runtime-error if the expression equals 0.
Definition: assert.cpp:154