Move error message and time to the beginning of the SEH crash log

This is more similar to the normal exception crashlog which also states
the problem and time at the beginning of the file.
This commit is contained in:
Julian Brost 2020-10-14 17:57:17 +02:00
parent 9ebd812da5
commit 8b67e4a637

View File

@ -931,12 +931,12 @@ LONG CALLBACK Application::SEHUnhandledExceptionFilter(PEXCEPTION_POINTERS exi)
Log(LogCritical, "Application") Log(LogCritical, "Application")
<< "Icinga 2 has terminated unexpectedly. Additional information can be found in '" << fname << "'"; << "Icinga 2 has terminated unexpectedly. Additional information can be found in '" << fname << "'";
DisplayInfoMessage(ofs);
ofs << "Caught unhandled SEH exception." << "\n" ofs << "Caught unhandled SEH exception." << "\n"
<< "Current time: " << Utility::FormatDateTime("%Y-%m-%d %H:%M:%S %z", Utility::GetTime()) << "\n" << "Current time: " << Utility::FormatDateTime("%Y-%m-%d %H:%M:%S %z", Utility::GetTime()) << "\n"
<< "\n"; << "\n";
DisplayInfoMessage(ofs);
ofs << "Stacktrace:\n" ofs << "Stacktrace:\n"
<< boost::stacktrace::stacktrace() << boost::stacktrace::stacktrace()
<< "\n"; << "\n";