Print details in uncaught SEH exception handler

This commit is contained in:
Julian Brost 2020-10-14 18:05:49 +02:00
parent 68e4b807d1
commit e11b4b7b55
1 changed files with 9 additions and 3 deletions

View File

@ -937,9 +937,15 @@ LONG CALLBACK Application::SEHUnhandledExceptionFilter(PEXCEPTION_POINTERS exi)
DisplayInfoMessage(ofs);
ofs << "Stacktrace:\n"
<< boost::stacktrace::stacktrace()
<< "\n";
std::ios::fmtflags savedflags(ofs.flags());
ofs << std::showbase << std::hex
<< "\nSEH exception:\n"
<< " Code: " << exi->ExceptionRecord->ExceptionCode << "\n"
<< " Address: " << exi->ExceptionRecord->ExceptionAddress << "\n"
<< " Flags: " << exi->ExceptionRecord->ExceptionFlags << "\n";
ofs.flags(savedflags);
ofs << "\nStacktrace:\n" << boost::stacktrace::stacktrace() << "\n";
DisplayBugMessage(ofs);