|
Qualia
0.2
|
#include <qualia/core/common.h>

Go to the source code of this file.
| #define __DEBUG_DUMMY_INSTRUCTION (static_cast<void>(0)) |
| #define __DEBUG_TRIGGER_ASSERT | ( | expr, | |
| func | |||
| ) | ((expr) ? static_cast<void>(0) : func("Fail: " __STRING(expr)) ); |
| #define __STRING | ( | x | ) | #x |
| #define DEBUG_ERROR (DEBUG_LEVEL >= DEBUG_LEVEL_ERROR) |
| #define DEBUG_LEVEL DEBUG_LEVEL_NODEBUG |
Error/warning/notification routines/macros. Level of debugging can be set by defining DEBUG_LEVEL at compile time. Assertions and messages that are below the level will simply be erased by the preprocessor (macros are actually replaced by a dummy/void operation), thus saving on memory usage and execution time.
WARNING: Notice that DEBUG_LEVEL is not supported on AVR/Arduino ie. all error macros are disabled on such platforms.
| #define DEBUG_LEVEL_ERROR 0 |
Only catch errors.
| #define DEBUG_LEVEL_NODEBUG -1 |
No debug.
| #define DEBUG_LEVEL_NOTICE 2 |
Catch errors, warnings and notices.
| #define DEBUG_LEVEL_WARNING 1 |
Catch both errors and warnings.
| #define DEBUG_NOTICE (DEBUG_LEVEL >= DEBUG_LEVEL_NOTICE) |
| #define DEBUG_WARNING (DEBUG_LEVEL >= DEBUG_LEVEL_WARNING) |
| #define Q_ASSERT_ERROR | ( | expr | ) | __DEBUG_DUMMY_INSTRUCTION |
| #define Q_ASSERT_ERROR_MESSAGE | ( | expr, | |
| ... | |||
| ) | __DEBUG_DUMMY_INSTRUCTION |
| #define Q_ASSERT_NOTICE | ( | expr | ) | __DEBUG_DUMMY_INSTRUCTION |
| #define Q_ASSERT_NOTICE_MESSAGE | ( | expr, | |
| ... | |||
| ) | __DEBUG_DUMMY_INSTRUCTION |
| #define Q_ASSERT_WARNING | ( | expr | ) | __DEBUG_DUMMY_INSTRUCTION |
| #define Q_ASSERT_WARNING_MESSAGE | ( | expr, | |
| ... | |||
| ) | __DEBUG_DUMMY_INSTRUCTION |
| #define Q_ERROR | ( | ... | ) | __DEBUG_DUMMY_INSTRUCTION |
| #define Q_MESSAGE | ( | ... | ) | __DEBUG_DUMMY_INSTRUCTION |
| #define Q_NOTICE | ( | ... | ) | __DEBUG_DUMMY_INSTRUCTION |
| #define Q_PRINT | ( | ... | ) | __DEBUG_DUMMY_INSTRUCTION |
| #define Q_WARNING | ( | ... | ) | __DEBUG_DUMMY_INSTRUCTION |
1.8.3.1