MCPcopy Create free account
hub / github.com/ZDoom/Raze / I_FatalError

Function I_FatalError

source/common/utility/engineerrors.cpp:111–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109extern FILE *Logfile;
110
111[[noreturn]] void I_FatalError(const char *error, ...)
112{
113 static bool alreadyThrown = false;
114 gameisdead = true;
115
116 if (!alreadyThrown) // ignore all but the first message -- killough
117 {
118 alreadyThrown = true;
119 char errortext[MAX_ERRORTEXT];
120 va_list argptr;
121 va_start(argptr, error);
122 vsnprintf(errortext, MAX_ERRORTEXT, error, argptr);
123 va_end(argptr);
124 I_DebugPrint(errortext);
125
126 // Record error to log (if logging)
127 if (Logfile)
128 {
129 fprintf(Logfile, "\n**** DIED WITH FATAL ERROR:\n%s\n", errortext);
130 fflush(Logfile);
131 }
132
133 throw CFatalError(errortext);
134 }
135 std::terminate(); // recursive I_FatalErrors must immediately terminate.
136}
137

Callers 15

parsecommandMethod · 0.85
compileconMethod · 0.85
loadconsFunction · 0.85
GetGameValuePtrFunction · 0.85
InitGameVarPointersFunction · 0.85
RegisterClassesFunction · 0.85
app_initMethod · 0.85
Saveable_RestoreCodeSymFunction · 0.85
Saveable_RestoreDataSymFunction · 0.85
loadPaletteMethod · 0.85
ParseMapInfoMethod · 0.85
G_ParseMapInfoFunction · 0.85

Calls 2

I_DebugPrintFunction · 0.85
CFatalErrorClass · 0.85

Tested by 2

GetUserFileFunction · 0.68
GetKnownFolderFunction · 0.68