fix(stageleft): re-propagate unexpected panics from invoke_quoted#80
Merged
Merged
Conversation
MingweiSamuel
approved these changes
Jun 19, 2026
luckyworkama
approved these changes
Jun 19, 2026
…h proper backtraces Previously, catch_unwind swallowed all panics including ones from buggy FreeVariable::to_tokens implementations. The custom panic hook suppressed all output, so even if the panic was re-raised there'd be no backtrace. Then props.unwrap() would fail with an unhelpful "Option::unwrap() on None". Now the panic hook only suppresses panics with the expected "stageleft: q!() closure completed" message and forwards all others to the previous hook (preserving backtraces). After catch_unwind, unexpected panics are re-raised via resume_unwind. Also removed an unused `use core::panic;` import and added a unit test. Co-authored-by: Infinity 🤖 <infinity@hydro.run> PR: #80
787155f to
8e94b1a
Compare
MingweiSamuel
approved these changes
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, catch_unwind swallowed all panics including ones from buggy
FreeVariable::to_tokens implementations, then failed on props.unwrap()
with "called Option::unwrap() on a None value" hiding the real cause.
Now the caught panic payload is checked against the expected
"stageleft: q!() closure completed" message. Any other panic is
re-raised via resume_unwind after restoring the hook and dropping the
mutex guard.
Also removed an unused
use core::panic;import and added a unit test.Co-authored-by: Infinity 🤖 infinity@hydro.run