Main Page   Modules   Compound List   File List   Compound Members   File Members  

Runtime check macros.

Runtime checks can be either asserts or throws. More...

Defines

#define TRYTHROW(_a, _msg)   if (!(_a)) _cthrow(_msg);
#define ASSERT(_a, _msg)   if (!(_a)) _cassert(_msg " at " __FILE__ ":", __LINE__);

Detailed Description

Runtime checks can be either asserts or throws.

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.


Define Documentation

#define ASSERT _a,
_msg       if (!(_a)) _cassert(_msg " at " __FILE__ ":", __LINE__);
 

See also:
TRYTHROW


Generated on Sat May 11 15:15:42 2002 for JauneRuntimeclib by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002