Skip to content

Conversation

@ion098
Copy link

@ion098 ion098 commented Sep 9, 2024

Allows running a scope guard only when the scope is (or is not) exited due to an exception

@ion098 ion098 marked this pull request as ready for review September 9, 2024 21:49
Copy link
Owner

@ricab ricab left a comment

Choose a reason for hiding this comment

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

Thank you @ion098, this is good stuff. In my view, this would be useful mainly in places where there are multiple return paths (in other cases, one might as well just call the function or dismiss the guard directly before returning). However, I have little time to tend to CI these days and I don't want to merge before that.

It would be premature to address them now but, as an advance notice, before merging I would have some requests, relating to commit organization, test coverage, and documentation.

I will leave this open for now, so that it is visible to anyone interested. Hopefully I will find some time to update things eventually.

@ricab
Copy link
Owner

ricab commented Sep 17, 2024

Hey @ion098, it looks like some declarations need matching updates: https://github.com/ricab/scope_guard/actions/runs/10817232638/job/30144354061?pr=33#step:8:14

And other runs you setup don't work.

Thanks again for your interest.

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