5.3. Registering Error Handlers

The ML provides the class ErrorOutput and the class ErrorOutputInfos for error handling and redirecting ML outputs. It contains a set of methods to print debug information, warnings, errors and fatal errors. There is a registration mechanism where the application can register itself to be notified when an error, a warning or debug information is to be printed or handled.

When you have registered your own error handling function with ErrorOutput::addErrorOutputCB(), the class ErrorOutput calls this function of type ErrorOutput::ErrorOutputCB to notify the application. It passes the registered userData pointer, a completely composed information string and a structure of type ErrorOutputInfos to the function.

A structure of type ErrorOutputInfos contains

See mlErrorOutputInfos.h . and mlErrorOutput.h in project MLUtilities for parameter descriptions.