Defines | |
#define | TRYTHROW(_a, _msg) if (!(_a)) _cthrow(_msg); |
#define | ASSERT(_a, _msg) if (!(_a)) _cassert(_msg " at " __FILE__ ":", __LINE__); |
Both represent differing levels of error and both may be compiled out. An assert is a less likely error such as null pointer or internal error. A throw is a more likely error such as going past the end of an array.
PENDING: Improve this. Asserts should be recoverable development errors, and the cases above should be two different levels of throw.
|
|