MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / ErrorMessage

Method ErrorMessage

engine/Poseidon/Foundation/Platform/AppFramePosix.cpp:44–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42extern void WarningMessageLevel(ErrorMessageLevel level, const char* format, va_list argptr);
43
44void 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
70void LinuxFrameFunctions::ErrorMessage(ErrorMessageLevel level, const char* format, va_list argptr)
71{

Callers

nothing calls this directly

Calls 5

vsprintfFunction · 0.85
DDTermFunction · 0.85
WarningMessageLevelFunction · 0.85
ErrorMessageFunction · 0.85
NextAliveExpectedMethod · 0.80

Tested by

no test coverage detected