Skip to content

Run ensure when return exits a begin/ensure#2989

Merged
kddnewton merged 2 commits into
masterfrom
ensure
May 4, 2026
Merged

Run ensure when return exits a begin/ensure#2989
kddnewton merged 2 commits into
masterfrom
ensure

Conversation

@kddnewton
Copy link
Copy Markdown
Member

This one is a bit complex. Basically TryInstructions gains a has_ensure field in order to determine how it should generate code in the catch block. If it's true, it will re-raise exceptions after the body has been run.

Copy link
Copy Markdown
Member

@seven1m seven1m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dang, that fixes a nice big bug. Well done.

@kddnewton kddnewton merged commit cbce2b3 into master May 4, 2026
@kddnewton kddnewton deleted the ensure branch May 4, 2026 20:45
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.

2 participants