Skip to content

fix(calm): only add stacktrace if one doesn't already exist#12

Merged
wood-jp merged 1 commit into
mainfrom
wood_jp/bugfix_calm_perf
Mar 24, 2026
Merged

fix(calm): only add stacktrace if one doesn't already exist#12
wood-jp merged 1 commit into
mainfrom
wood_jp/bugfix_calm_perf

Conversation

@wood-jp
Copy link
Copy Markdown
Owner

@wood-jp wood-jp commented Mar 24, 2026

Summary

When adding the stacktrace to the recovered error, it is possible that the provided error already has a stacktrace. In such a case, don't call GetStack as there is no need.

Also just use the existing err variable rather than creating a panicErr var which risks confusion. This is much more clear.

Test plan

No test changes required.

  • just test passes
  • just lint passes
  • New behaviour is covered by tests.

@wood-jp wood-jp merged commit 590d76c into main Mar 24, 2026
5 checks passed
@wood-jp wood-jp deleted the wood_jp/bugfix_calm_perf branch March 24, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant