aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/logging/crashhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDLL/logging/crashhandler.cpp')
-rw-r--r--NorthstarDLL/logging/crashhandler.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/NorthstarDLL/logging/crashhandler.cpp b/NorthstarDLL/logging/crashhandler.cpp
index 3427e10a..baa75923 100644
--- a/NorthstarDLL/logging/crashhandler.cpp
+++ b/NorthstarDLL/logging/crashhandler.cpp
@@ -34,16 +34,15 @@ void PrintExceptionLog(ExceptionLog& exc)
if (g_pModManager)
{
spdlog::error("Loaded mods: ");
- for (const Mod& mod : g_pModManager->GetMods())
- {
- if (mod.m_bEnabled)
- spdlog::error("{} {}", mod.Name, mod.Version);
- }
+ for (const Mod& mod : g_pModManager->GetMods() | ModManager::FilterEnabled)
+ spdlog::error("{} {}", mod.Name, mod.Version);
}
+
spdlog::error(exc.cause);
// If this was a runtime error, print the message
if (exc.runtimeInfo.length() != 0)
spdlog::error("\"{}\"", exc.runtimeInfo);
+
spdlog::error("At: {} + {}", exc.trace[0].name, exc.trace[0].relativeAddress);
spdlog::error("");
spdlog::error("Stack trace:");
@@ -236,7 +235,7 @@ void CreateMiniDump(EXCEPTION_POINTERS* exceptionInfo)
time_t time = std::time(nullptr);
tm currentTime = *std::localtime(&time);
std::stringstream stream;
- stream << std::put_time(&currentTime, (GetNorthstarPrefix() + "/logs/nsdump%Y-%m-%d %H-%M-%S.dmp").c_str());
+ stream << std::put_time(&currentTime, (GetNorthstarPrefix() / "logs/nsdump%Y-%m-%d %H-%M-%S.dmp").string().c_str());
auto hMinidumpFile = CreateFileA(stream.str().c_str(), GENERIC_WRITE, FILE_SHARE_READ, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
if (hMinidumpFile)