(hopefully) fix silent crashes
This commit is contained in:
parent
74b4ae9da5
commit
49432f689d
@ -22,8 +22,12 @@ namespace
|
||||
|
||||
__declspec(noreturn) void Terminate()
|
||||
{
|
||||
MessageBoxW(NULL, lastError.c_str(), L"Textractor ERROR", MB_ICONERROR);
|
||||
CreateThread(nullptr, 0, [](void* lastError) -> DWORD
|
||||
{
|
||||
MessageBoxW(NULL, (wchar_t*)lastError, L"Textractor ERROR", MB_ICONERROR); // might fail to display if called in main thread and exception was in main event loop
|
||||
abort();
|
||||
}, lastError.data(), 0, nullptr);
|
||||
Sleep(MAXDWORD);
|
||||
}
|
||||
|
||||
LONG WINAPI ExceptionLogger(EXCEPTION_POINTERS* exception)
|
||||
|
Loading…
Reference in New Issue
Block a user