Brings up an error message for an int3
| 170 | |
| 171 | // Brings up an error message for an int3 |
| 172 | void 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 |
| 196 | void AssertionFailed(const char *expstr, const char *file, int line) { |
nothing calls this directly
no test coverage detected