MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ddgr_FatalError

Function ddgr_FatalError

dd_grwin32/ddgrWin32Init.cpp:175–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173static int DDGR_num_msgs = 0;
174
175void ddgr_FatalError(const char *fmt, ...) {
176 // create our error list and flag a system error
177 char buf[768];
178
179 // get subsystem name.
180 int i;
181 for (i = 0; DDGR_subsystems[i] != -1; i++) {
182 if (DDGR_subsystems[i] == LIB_DATA(subsystem)) {
183 break;
184 }
185 }
186
187 // create whole error message
188 std::va_list arglist;
189
190 va_start(arglist, fmt);
191 std::vsnprintf(buf, 768, fmt, arglist);
192 va_end(arglist);
193
194 if (DDGR_subsystems[i] = !-1) {
195 strcat(buf, "\n\nSubsystem: ");
196 strcat(buf, DDGR_subsystem_names[i]);
197 }
198 strcat(buf, "\n\nError stack:");
199 for (i = 0; i < DDGR_num_msgs; i++) {
200 strcat(buf, "\n");
201 strcat(buf, DDGR_error_msgs[i]);
202 delete[] DDGR_error_msgs[i];
203 }
204
205 Error(buf);
206}
207
208void ddgr_PushError(const char *fmt, ...) {
209 std::va_list arglist;

Callers 7

ddgr_surf_CreateFunction · 0.85
ddgr_surf_LockFunction · 0.85
ddgr_surf_UnlockFunction · 0.85
ddgr_surf_InitVideoFunction · 0.85
ddgr_surf_FlipVideoFunction · 0.85
ddgr_surf_BltFunction · 0.85
ddgr_InitFunction · 0.85

Calls 1

ErrorFunction · 0.85

Tested by

no test coverage detected