If the expression exp evaluates to FALSE, the will print a message and halt.
xAssert(bool exp)
Note that xAssert statements are macros which are only active
in DEBUG mode (see Section ). In OPTIMIZE mode, xAssert
and trace statements go away completely. You should keep this in mind
to avoid bugs that show up only in OPTIMIZE mode. For example, the
statment:
xAssert(mapResolve(map, key, &p) == XK_SUCCESS);
will have no effect in OPTIMIZE mode. You should be careful to separate the operation and the check of the return code, as follows.
res = mapResolve(map, key, &p); xAssert(res == XK_SUCCESS);
Non-fatal error conditions can print warnings even in nondebugging mode by using the xError call.
xError(char *ErrorString)