OTCLIB_WARNING - macro to display an error message then continue execution

SYNOPSIS

#include <OTC/OTC.h>

void OTCLIB_WARNING(message);

DESCRIPTION

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

EXAMPLES

if (aStr == 0)
{
  OTCLIB_WARNING("Nil pointer");
  aStr = "";
}

FORMAT

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

NOTES

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

SEE ALSO

OTC_Logger