#include <errcode.h>
Definition at line 44 of file errcode.h.
◆ ERRCODE()
void constexpr tesseract::ERRCODE::ERRCODE |
( |
const char * |
string | ) |
|
|
inlineconstexpr |
◆ error()
void tesseract::ERRCODE::error |
( |
const char * |
caller, |
|
|
TessErrorLogCode |
action, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| const |
Definition at line 38 of file errcode.cpp.
47 if (caller !=
nullptr) {
49 msgptr += sprintf(msgptr,
"%s:", caller);
52 msgptr += sprintf(msgptr,
"Error:%s", message);
53 if (format !=
nullptr) {
54 msgptr += sprintf(msgptr,
":");
55 va_start(args, format);
58 msgptr += _vsnprintf(msgptr,
MAX_MSG - 2 - (msgptr - msg), format, args);
63 msgptr += vsprintf(msgptr, format, args);
65 msgptr += sprintf(msgptr,
"\n");
70 msgptr += sprintf(msgptr,
"\n");
74 fprintf(stderr,
"%s", msg);
86 # if defined(__GNUC__)
89 *
reinterpret_cast<int *
>(0) = 0;
constexpr ERRCODE BADERRACTION("Illegal error action")
void error(const char *caller, TessErrorLogCode action, const char *format,...) const __attribute__((format(printf
The documentation for this class was generated from the following files: