Return a value when stacktrace is empty.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
9726920b7f
commit
20a7dc55a0
|
@ -37,6 +37,9 @@ namespace ArbUt {
|
||||||
[[nodiscard]] std::string GetStacktrace([[maybe_unused]] size_t depth = 6,
|
[[nodiscard]] std::string GetStacktrace([[maybe_unused]] size_t depth = 6,
|
||||||
[[maybe_unused]] bool include_addr = true) const {
|
[[maybe_unused]] bool include_addr = true) const {
|
||||||
#if !WINDOWS
|
#if !WINDOWS
|
||||||
|
if (_stack.size() == 0){
|
||||||
|
return "No stack trace could be retrieved.";
|
||||||
|
}
|
||||||
backward::TraceResolver tr;
|
backward::TraceResolver tr;
|
||||||
tr.load_stacktrace(_stack);
|
tr.load_stacktrace(_stack);
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
|
|
Loading…
Reference in New Issue