Go to the source code of this file.
|
#define | SAGA_ASSERTIONS_ENABLED |
|
#define | debugBreak() __builtin_trap() |
|
#define | SASSERT(expr) |
| Assert an expression evaluates to true. If it does not, log a FATAL level message and stop the execution of the program.
|
|
#define | SASSERT_MESSAGE(expr, message, ...) |
| Assert an expression evaluates to true. If it does not, log a FATAL level message and stop the execution of the program.
|
|
#define | SASSERT_DEBUG(expr) |
|
#define | SASSERT_DEBUG_MESSAGE(expr, message) |
|
|
void | Saga::reportAssertionFailed (const char *expression, const char *message, const char *file, int line,...) |
| Output a message signaling that an assertion has failed. This message is of the form: Assertion Failure: #expression, message: message , in file: file , line: line
|
|
◆ debugBreak
#define debugBreak |
( |
| ) |
__builtin_trap() |
◆ SAGA_ASSERTIONS_ENABLED
#define SAGA_ASSERTIONS_ENABLED |
◆ SASSERT
Value: { \
if (!(expr)) { \
reportAssertionFailed(#expr, "", __FILE__, __LINE__); \
debugBreak(); \
} \
}
Assert an expression evaluates to true. If it does not, log a FATAL level message and stop the execution of the program.
- Parameters
-
expr | an expression that evaluates to a boolean. |
◆ SASSERT_DEBUG
#define SASSERT_DEBUG |
( |
|
expr | ) |
|
◆ SASSERT_DEBUG_MESSAGE
#define SASSERT_DEBUG_MESSAGE |
( |
|
expr, |
|
|
|
message |
|
) |
| |
◆ SASSERT_MESSAGE
#define SASSERT_MESSAGE |
( |
|
expr, |
|
|
|
message, |
|
|
|
... |
|
) |
| |
Value: { \
if (!(expr)) { \
reportAssertionFailed(#expr, message, __FILE__, __LINE__, ##__VA_ARGS__); \
debugBreak(); \
} \
}
Assert an expression evaluates to true. If it does not, log a FATAL level message and stop the execution of the program.
- Parameters
-
expr | an expression that evaluates to a boolean. |
message | a message that will be displayed when an error happens. |