diff options
| author | zousar <[email protected]> | 2025-08-05 14:58:08 -0600 |
|---|---|---|
| committer | zousar <[email protected]> | 2025-08-05 14:58:08 -0600 |
| commit | 7ddededb31c9b3415d4d85f0b284e5bf45c723b9 (patch) | |
| tree | e908f97766720550b7d3d4e8553b3c83132c0735 /src/zencore/callstack.cpp | |
| parent | xmake precommit (diff) | |
| parent | de/stringbuilder safety (#456) (diff) | |
| download | zen-7ddededb31c9b3415d4d85f0b284e5bf45c723b9.tar.xz zen-7ddededb31c9b3415d4d85f0b284e5bf45c723b9.zip | |
Merge branch 'main' into zs/put-overwrite-policy
Diffstat (limited to 'src/zencore/callstack.cpp')
| -rw-r--r-- | src/zencore/callstack.cpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/zencore/callstack.cpp b/src/zencore/callstack.cpp index 9b06d4575..b22f2ec1f 100644 --- a/src/zencore/callstack.cpp +++ b/src/zencore/callstack.cpp @@ -179,19 +179,26 @@ FormatCallstack(const CallstackFrames* Callstack, StringBuilderBase& SB, std::st bool First = true; for (const std::string& Symbol : GetFrameSymbols(Callstack)) { - if (!First) + try { - SB.Append("\n"); - } - else - { - First = false; + if (!First) + { + SB.Append("\n"); + } + else + { + First = false; + } + if (!Prefix.empty()) + { + SB.Append(Prefix); + } + SB.Append(Symbol); } - if (!Prefix.empty()) + catch (const std::exception&) { - SB.Append(Prefix); + break; } - SB.Append(Symbol); } } |