#include <OTC/OTC.h> void OTCLIB_WARNING(message);
OTCLIB_WARNING()
should be used when an error occurs, and where it is possible to continue
execution. The message supplied as argument to the macro will be sent
to the logger at WARNING
level.
In addition to this, information about the file in which this occurred, and
the line number within that file will also be sent to the logger.
if (aStr == 0) { OTCLIB_WARNING("Nil pointer"); aStr = ""; }
If the exception is caught and the information it contains is dumped to the logger, the format of the output will be:
WARNING: Nil pointer WARNING: Location: "_warning.cc", line 33
The macro may be used in either C or C++ code.