mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-21 21:17:25 +00:00
feat: get & print std::current_exception (#1366)
This commit is contained in:
parent
dd9d94f75f
commit
98d2f25af2
@ -115,6 +115,13 @@ void GenerateDump() {
|
||||
}
|
||||
|
||||
void CatchUnhandled(int sig) {
|
||||
std::exception_ptr eptr = std::current_exception();
|
||||
try {
|
||||
if (eptr) std::rethrow_exception(eptr);
|
||||
} catch(const std::exception& e) {
|
||||
LOG("Caught exception: '%s'", e.what());
|
||||
}
|
||||
|
||||
#ifndef __include_backtrace__
|
||||
|
||||
std::string fileName = Diagnostics::GetOutDirectory() + "crash_" + Diagnostics::GetProcessName() + "_" + std::to_string(getpid()) + ".log";
|
||||
|
Loading…
Reference in New Issue
Block a user