Return a value when stacktrace is empty.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-08-16 10:41:10 +02:00
parent 9726920b7f
commit 20a7dc55a0
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 3 additions and 0 deletions

View File

@ -37,6 +37,9 @@ namespace ArbUt {
[[nodiscard]] std::string GetStacktrace([[maybe_unused]] size_t depth = 6,
[[maybe_unused]] bool include_addr = true) const {
#if !WINDOWS
if (_stack.size() == 0){
return "No stack trace could be retrieved.";
}
backward::TraceResolver tr;
tr.load_stacktrace(_stack);
std::stringstream ss;