File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 1313#include < plugify/numerics.hpp>
1414#include < plugify/any.hpp>
1515
16+ #if PLUGIFY_STACKTRACE_SUPPORT
17+ #include < stacktrace>
18+ #else
1619#include < cpptrace/cpptrace.hpp>
20+ #endif
1721
1822#if GOLM_PLATFORM_WINDOWS
1923#include < windows.h>
@@ -216,9 +220,14 @@ void PrintException(GoString message) {
216220 if (const auto & provider = g_golm.GetProvider ()) {
217221 provider->Log (std::format (LOG_PREFIX " [Exception] {}" , std::string_view (message)), Severity::Error);
218222
223+ #if PLUGIFY_STACKTRACE_SUPPORT
224+ auto trace = std::stacktrace::current ();
225+ provider->Log (std::to_string (trace), Severity::Error);
226+ #else
219227 std::stringstream stream;
220228 cpptrace::generate_trace ().print (stream);
221229 provider->Log (stream.str (), Severity::Error);
230+ #endif
222231 }
223232}
224233
You can’t perform that action at this time.
0 commit comments