- Reporting errors and halting execution.
check(): like assert() in C, can be disabled by DO_CHECK 0
verify(): like check(), but the expression is still executed on DO_CHECK 0 (e.g. for variable assignments)
disadvantage: halts program execution (application ends, Editor users can loose unsaved work).
when to use: catch fatal errors
- Reporting errors and halting execution exclusively in debug builds.
difference to (1): they are only active in debug builds (when DO_GUARD_SLOW 1)
- Reporting errors (and do not halt the execution).
check(), but the program execution can be continued after the break
when to use: to get informed about unexpected state.
useful when you want runtime code verification but you're handling the error case anyway