Assertion checks for debugging.
More...
|
void | mxc_assert (const char *expr, const char *file, int line) |
| Assert an error when the given expression fails during debugging. More...
|
|
◆ mxc_assert()
void mxc_assert |
( |
const char * |
expr, |
|
|
const char * |
file, |
|
|
int |
line |
|
) |
| |
- Note
- To use debug assertions, the symbol
MXC_ASSERT_ENABLE
must be defined.
- Parameters
-
expr | String with the expression that failed the assertion. |
file | File containing the failed assertion. |
line | Line number for the failed assertion. |
- Note
- This is defined as a weak function and can be overridden at the application layer to print the debugging information.
printf("%s, file: %s, line %d\n", expr, file, line);
-
To use debug assertions, the symbol
MXC_ASSERT_ENABLE
must be defined.