Use boost::stacktrace instead of custom implementation in Windows SEH filter

This commit is contained in:
Julian Brost 2020-10-14 16:25:56 +02:00
parent 0b9ef5ab6d
commit 2c9b1d8415

View File

@ -18,6 +18,7 @@
#include <boost/exception/errinfo_api_function.hpp> #include <boost/exception/errinfo_api_function.hpp>
#include <boost/exception/errinfo_errno.hpp> #include <boost/exception/errinfo_errno.hpp>
#include <boost/exception/errinfo_file_name.hpp> #include <boost/exception/errinfo_file_name.hpp>
#include <boost/stacktrace.hpp>
#include <sstream> #include <sstream>
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
@ -932,9 +933,9 @@ LONG CALLBACK Application::SEHUnhandledExceptionFilter(PEXCEPTION_POINTERS exi)
<< "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";
StackTrace trace(exi); ofs << "Stacktrace:\n"
ofs << "Stacktrace:" << "\n"; << boost::stacktrace::stacktrace()
trace.Print(ofs, 1); << "\n";
DisplayBugMessage(ofs); DisplayBugMessage(ofs);