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
a type identifier (warning, error, fatal error or debug),
a prefix string with arbitrary information printed before a function,
the function name,
the error code,
the reason/info string,
the string with information about the handling of the error,
the file name,
the line number and
the time stamp when the message was received by the error handler.
See
mlErrorOutputInfos.h
. and
mlErrorOutput.h
in project
MLUtilities
for parameter descriptions.
© 2024 MeVis Medical Solutions AG