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

Function Int3MessageBox

misc/error.cpp:172–193  ·  view source on GitHub ↗

Brings up an error message for an int3

Source from the content-addressed store, hash-verified

170
171// Brings up an error message for an int3
172void Int3MessageBox(const char *file, int line) {
173#ifndef RELEASE
174 char title[128], message[500];
175 int answer;
176
177 snprintf(title, sizeof(title), "%s Debug Break", App_title);
178 snprintf(message, sizeof(message), "Int3 in %s at line %d.", file, line);
179
180 if (DebugBreak_callback_stop)
181 (*DebugBreak_callback_stop)();
182
183 answer = Debug_ErrorBox(OSMBOX_YESNO, title, message, "It's probably safe to continue. Continue?");
184
185 if (answer == IDNO) {
186 SetDebugBreakHandlers(NULL, NULL);
187 exit(1);
188 }
189
190 if (DebugBreak_callback_resume)
191 (*DebugBreak_callback_resume)();
192#endif
193}
194
195// prints out an assertion error
196void AssertionFailed(const char *expstr, const char *file, int line) {

Callers

nothing calls this directly

Calls 2

SetDebugBreakHandlersFunction · 0.85
Debug_ErrorBoxFunction · 0.50

Tested by

no test coverage detected