tflite:: ErrorReporter
This is an abstract class.
#include <error_reporter.h>
A functor that reports error to supporting system.
Summary
Invoked similar to printf.
Usage: ErrorReporter foo; foo.Report("test %d", 5); or va_list args; foo.Report("test %d", args); // where args is va_list
Subclass ErrorReporter to provide another reporting destination. For example, if you have a GUI program, you might redirect to a buffer that drives a GUI error log box.
Inheritance
Direct Known Subclasses:tflite::StderrReporter
Constructors and Destructors |
|
---|---|
~ErrorReporter()
|
Public functions |
|
---|---|
Report(const char *format, va_list args)=0
|
virtual int
Converts
args to character equivalents according to format string, constructs the error string and report it. |
Report(const char *format, ...)
|
int
Converts arguments to character equivalents according to
format string, constructs the error string and report it. |
ReportError(void *, const char *format, ...)
|
int
Equivalent to
Report above. |
Public functions
Report
virtual int Report( const char *format, va_list args )=0
Converts args
to character equivalents according to format
string, constructs the error string and report it.
Returns number of characters written or zero on success, and negative number on error.
Report
int Report( const char *format, ... )
Converts arguments to character equivalents according to format
string, constructs the error string and report it.
Returns number of characters written or zero on success, and negative number on error.
ReportError
int ReportError( void *, const char *format, ... )
Equivalent to Report
above.
The additional void*
parameter is unused. This method is for compatibility with macros that takes TfLiteContext
, like TF_LITE_ENSURE and related macros.
~ErrorReporter
virtual ~ErrorReporter()=default