|
xerus
a general purpose tensor library
|
Header file for CHECK and REQUIRE macros. More...
Go to the source code of this file.
Macros | |
| #define | XERUS_CHECK(condition, level, message) if(XERUS_IS_LOGGING(level) && !(condition)) { XERUS_LOG(level, #condition " failed msg: " << message); } else void(0) |
| Checks whether condition is true and calls XERUS_LOG(level, message) otherwise. More... | |
| #define | XERUS_IF_CHECK(expression) expression |
| Executes expression only if the compilation was without XERUS_DISABLE_RUNTIME_CHECKS set. More... | |
| #define | XERUS_IF_NO_CHECK(expression) |
| #define | XERUS_INTERNAL_CHECK(condition, message) |
| Checks whether condition is true. logs a critical error otherwise via XERUS_LOG(fatal, message). and prints information on how to report a bug. More... | |
| #define | XERUS_REQUIRE(condition, message) XERUS_CHECK(condition, error, message) |
| Checks whether condition is true. logs an error otherwise via XERUS_LOG(error, message). More... | |
| #define | XERUS_REQUIRE_TEST (void)0 |
Header file for CHECK and REQUIRE macros.
Definition in file check.h.
| #define XERUS_CHECK | ( | condition, | |
| level, | |||
| message | |||
| ) | if(XERUS_IS_LOGGING(level) && !(condition)) { XERUS_LOG(level, #condition " failed msg: " << message); } else void(0) |
Checks whether condition is true and calls XERUS_LOG(level, message) otherwise.
The check is omitted if level is not logged anyways.
| #define XERUS_IF_CHECK | ( | expression | ) | expression |
| #define XERUS_INTERNAL_CHECK | ( | condition, | |
| message | |||
| ) |
Checks whether condition is true. logs a critical error otherwise via XERUS_LOG(fatal, message). and prints information on how to report a bug.
| #define XERUS_REQUIRE | ( | condition, | |
| message | |||
| ) | XERUS_CHECK(condition, error, message) |
Checks whether condition is true. logs an error otherwise via XERUS_LOG(error, message).