Go to the documentation of this file.
32 #ifndef ROSCONSOLE_ROSASSERT_H
33 #define ROSCONSOLE_ROSASSERT_H
94 #if defined(__MINGW32__)
95 # define ROS_ISSUE_BREAK() DebugBreak();
96 #elif defined(_MSC_VER)
97 # define ROS_ISSUE_BREAK() __debugbreak();
98 #elif defined(__powerpc64__)
99 # define ROS_ISSUE_BREAK() asm volatile ("tw 31,1,1");
100 #elif defined(__i386__) || defined(__ia64__) || defined(__x86_64__)
101 # define ROS_ISSUE_BREAK() asm("int $3");
104 # define ROS_ISSUE_BREAK() abort();
108 #ifndef ROS_ASSERT_ENABLED
109 #define ROS_ASSERT_ENABLED
113 #ifdef ROS_ASSERT_ENABLED
114 #define ROS_BREAK() \
116 ROS_FATAL("BREAKPOINT HIT\n\tfile = %s\n\tline=%d\n", __FILE__, __LINE__); \
120 #define ROS_ASSERT(cond) \
123 ROS_FATAL("ASSERTION FAILED\n\tfile = %s\n\tline = %d\n\tcond = %s\n", __FILE__, __LINE__, #cond); \
128 #define ROS_ASSERT_MSG(cond, ...) \
131 ROS_FATAL("ASSERTION FAILED\n\tfile = %s\n\tline = %d\n\tcond = %s\n\tmessage = ", __FILE__, __LINE__, #cond); \
132 ROS_FATAL(__VA_ARGS__); \
138 #define ROS_ASSERT_CMD(cond, cmd) \
148 #define ROS_ASSERT(cond)
149 #define ROS_ASSERT_MSG(cond, ...)
150 #define ROS_ASSERT_CMD(cond, cmd)
153 #endif // ROSCONSOLE_ROSASSERT_H
rosconsole
Author(s): Josh Faust
autogenerated on Wed Mar 2 2022 00:53:52