diff --git a/.github/release-please-manifest.json b/.github/release-please-manifest.json index b725ab0..47fb725 100644 --- a/.github/release-please-manifest.json +++ b/.github/release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.0.1" + ".": "2.0.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index bda7d3a..2f0cc73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.2](https://github.com/untrustedmodders/plugify-module-golang/compare/v2.0.1...v2.0.2) (2025-09-27) + + +### Bug Fixes + +* disable stacktrace if not avail ([e820178](https://github.com/untrustedmodders/plugify-module-golang/commit/e8201789034df738f089743c77d5cddbea84c53b)) + ## [2.0.1](https://github.com/untrustedmodders/plugify-module-golang/compare/v2.0.0...v2.0.1) (2025-09-27) diff --git a/src/module.cpp b/src/module.cpp index 1b96991..a4c6ccd 100644 --- a/src/module.cpp +++ b/src/module.cpp @@ -9,9 +9,15 @@ #include #include -#include #include +#if __has_include() +#include +#define HAS_STACKTRACE 1 +#else +#define HAS_STACKTRACE 0 +#endif + #define LOG_PREFIX "[GOLM] " using namespace golm; @@ -265,9 +271,10 @@ const char* GetCacheDir() { void PrintException(GoString message) { if (const auto& provider = g_golm.GetProvider()) { provider->Log(std::format(LOG_PREFIX "[Exception] {}", std::string_view(message)), Severity::Error); - +#if HAS_STACKTRACE auto trace = std::stacktrace::current(); provider->Log(std::to_string(trace), Severity::Error); +#endif } } diff --git a/version.txt b/version.txt index 38f77a6..e9307ca 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.0.1 +2.0.2