OTCLIB_EXCEPTION - macro to generate an exception

SYNOPSIS

#include <OTC/OTC.h>

void OTCLIB_EXCEPTION(description);

DESCRIPTION

The macro 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.

EXAMPLES

if (aStr == 0)
  OTCLIB_EXCEPTION("Nil pointer");

FORMAT

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

NOTES

The macro may be used in either C or C++ code.

SEE ALSO

OTC_Exception