#include <OTC/OTC.h> void OTCLIB_EXCEPTION(description);
OTCLIB_EXCEPTION()
can be used to generate a generic exception of type
OTC_Exception
where the exception is described by the
description
argument.
This description will be sent to the logger, as will information
about the file in which the exception occurred and the line within that
file.
if (aStr == 0) OTCLIB_EXCEPTION("Nil pointer");
If the exception is caught and the information it contains is dumped to the logger, the format of the output will be:
ERROR: Nil pointer ERROR: Location: "_errors.cc", line 33
The macro may be used in either C or C++ code.