The Assertion Library  0.2.1
Defines | Variables
assert.h File Reference

Header for Assertion Library (CBL) More...

#include "cbl/except.h"
Include dependency graph for assert.h:

Defines

#define assert(e)   ((void)((e) || (EXCEPT_RAISE(assert_exceptfail), 0)))
 replaces the standard assert() with a version supporting an exception.

Variables

const except_t assert_exceptfail
 exception for assertion failure.

Detailed Description

Header for Assertion Library (CBL)

Documentation for Assertion Library (CBL)


Define Documentation

#define assert (   e)    ((void)((e) || (EXCEPT_RAISE(assert_exceptfail), 0)))

replaces the standard assert() with a version supporting an exception.

An activated assert() raises an exception named assert_exceptfail that is defined in assert.c. The differences between this exception version and the standard's version are

  • The exception version does not print the given expression, e;
  • The exception version does not abort; it merely raise an exception and let the exception handler decide what to do.

Possible exceptions: assert_exceptfail

Unchecked errors: none

 All Files Variables Defines