| 42 | extern void WarningMessageLevel(ErrorMessageLevel level, const char* format, va_list argptr); |
| 43 | |
| 44 | void LinuxFrameFunctions::ErrorMessage(const char* format, va_list argptr) |
| 45 | { |
| 46 | static int avoidRecursion = 0; |
| 47 | if (avoidRecursion++ != 0) |
| 48 | { |
| 49 | return; |
| 50 | } |
| 51 | BString<256> buf; |
| 52 | vsprintf(buf, format, argptr); |
| 53 | // Critical engine error. Fatal under --strict; logged-and-continue under --no-strict |
| 54 | // (the build players run). The ERROR log also trips the strict latch under --strict. |
| 55 | LOG_ERROR(Core, "Critical error: {}", (const char*)buf); |
| 56 | |
| 57 | if (!LoggingSystem::IsStrictMode()) |
| 58 | { |
| 59 | avoidRecursion = 0; // a later, distinct critical error must still report |
| 60 | return; |
| 61 | } |
| 62 | |
| 63 | GDebugger.NextAliveExpected(15 * 60 * 1000); |
| 64 | DDTerm(); |
| 65 | fputs(buf, stderr); |
| 66 | fputc('\n', stderr); |
| 67 | exit(1); |
| 68 | } |
| 69 | |
| 70 | void LinuxFrameFunctions::ErrorMessage(ErrorMessageLevel level, const char* format, va_list argptr) |
| 71 | { |
nothing calls this directly
no test coverage detected