Go to the documentation of this file.
27 #ifndef ERROR_INCLUDED
28 #define ERROR_INCLUDED
47 #warning "DEBUG_LEVEL is not supported on AVR/Arduino: forcing DEBUG_LEVEL_NODEBUG"
50 #define DEBUG_LEVEL DEBUG_LEVEL_NODEBUG
56 #define DEBUG_LEVEL_NODEBUG -1
59 #define DEBUG_LEVEL_ERROR 0
62 #define DEBUG_LEVEL_WARNING 1
65 #define DEBUG_LEVEL_NOTICE 2
69 #define DEBUG_LEVEL DEBUG_LEVEL_ERROR
73 #define DEBUG_ERROR (DEBUG_LEVEL >= DEBUG_LEVEL_ERROR)
74 #define DEBUG_WARNING (DEBUG_LEVEL >= DEBUG_LEVEL_WARNING)
75 #define DEBUG_NOTICE (DEBUG_LEVEL >= DEBUG_LEVEL_NOTICE)
79 #define __STRING(x) #x
84 #define __DEBUG_TRIGGER_ASSERT(expr, func) \
85 ((expr) ? static_cast<void>(0) : func("Fail: " __STRING(expr)) );
88 #define __DEBUG_DUMMY_INSTRUCTION (static_cast<void>(0))
99 void Q_ERROR(
const char* msg, ...);
105 #define Q_ASSERT_ERROR(expr) __DEBUG_TRIGGER_ASSERT(expr, Q_ERROR)
109 #define Q_ERROR(...) __DEBUG_DUMMY_INSTRUCTION
110 #define Q_ASSERT_ERROR_MESSAGE(expr, ...) __DEBUG_DUMMY_INSTRUCTION
111 #define Q_ASSERT_ERROR(expr) __DEBUG_DUMMY_INSTRUCTION
124 #define Q_ASSERT_WARNING(expr) __DEBUG_TRIGGER_ASSERT(expr, Q_WARNING)
128 #define Q_WARNING(...) __DEBUG_DUMMY_INSTRUCTION
129 #define Q_ASSERT_WARNING_MESSAGE(expr, ...) __DEBUG_DUMMY_INSTRUCTION
130 #define Q_ASSERT_WARNING(expr) __DEBUG_DUMMY_INSTRUCTION
137 void Q_NOTICE(
const char* msg, ...);
143 #define Q_ASSERT_NOTICE(expr) __DEBUG_TRIGGER_ASSERT(expr, Q_NOTICE)
147 #define Q_NOTICE(...) __DEBUG_DUMMY_INSTRUCTION
148 #define Q_ASSERT_NOTICE_MESSAGE(expr, ...) __DEBUG_DUMMY_INSTRUCTION
149 #define Q_ASSERT_NOTICE(expr) __DEBUG_DUMMY_INSTRUCTION
155 void Q_PRINT(
const char* msg, ...);
160 #define Q_PRINT(...) __DEBUG_DUMMY_INSTRUCTION
161 #define Q_MESSAGE(...) __DEBUG_DUMMY_INSTRUCTION