class CorAssertHandler Assertion checking mechanism
Assertion checking mechanism
SYNOPSIS
#include <cor_assert_handler.h>
CorAssertHandler handler;
DESCRIPTION
You can write your own assertion handling function, and tell the assertion
system to call it whenever an assertion is violated. The function must
take one of two forms:
1. No arguments
void <handler>();
If an assertion fires, an error message is printed to standard output,
then the application handler is called.2. Arguments
void <handler>(const char* file, int line, const char* explanation);
If an assertion fires, the application handler is called. The first
argument is the name of the file in which the assertion appears; the
second argument is the line number of the assertion within the file;
the third argument is the 'explanation' which appears in the assert
macro.Tell the assertion system to use your handler via the call
corAssertHandler.set(<handler>);
If you want to save the handler previously used, do this:
CorAssertHandler old = corAssertHandler.set(<handler>);
after which 'old' can be subsequently used as an argument to
corAssertHandler.set() if desired.To resume default behaviour:
corAssertHandler.cancel();
or
CorAssertHandler old = corAssertHandler.cancel();
If no handler is set, your program will abort.
SEE ALSO
COR_ASSERT
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de