MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / VectoredExceptionHandler

Function VectoredExceptionHandler

src/os/windows/crashlog_win.cpp:362–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360}
361
362static LONG WINAPI VectoredExceptionHandler(EXCEPTION_POINTERS *ep)
363{
364 if (CrashLogWindows::current != nullptr && CrashLogWindows::current->try_execute_active) {
365#if defined(_MSC_VER)
366 return EXCEPTION_CONTINUE_SEARCH;
367#else
368 longjmp(CrashLogWindows::current->internal_fault_jmp_buf, 1);
369#endif
370 }
371
372 if (ep->ExceptionRecord->ExceptionCode == 0xC0000374 /* heap corruption */) {
373 return ExceptionHandler(ep);
374 }
375 if (ep->ExceptionRecord->ExceptionCode == EXCEPTION_STACK_OVERFLOW) {
376 return ExceptionHandler(ep);
377 }
378 if (ep->ExceptionRecord->ExceptionCode == CUSTOM_ABORT_EXCEPTION) {
379 return ExceptionHandler(ep);
380 }
381
382 return EXCEPTION_CONTINUE_SEARCH;
383}
384
385static void CDECL CustomAbort(int)
386{

Callers

nothing calls this directly

Calls 1

ExceptionHandlerFunction · 0.85

Tested by

no test coverage detected