-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
captures with unexpected exceptions #748
Comments
No it's not possible, because captures are local to the scope they appear in. When an unCHECKed exception occurs, that scope is finished (local objects holding CAPTURE destroyed) before entering the handler (the one that prints "FAILED: due to unexpected exception"). |
I think it could be possible with the use of C++17's or maybe just logging in globals in the destructor of the local capture stuff |
I was beaten by this again so I thought to give it a go and made a PR |
Great, thanks!
…On 4 April 2017 at 12:27, Martin Hořeňovský ***@***.***> wrote:
Closed #748 <#748> via #876
<#876>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#748 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AHTojfwAH9NbjMoVDfHUoNlG2J_93Lhoks5rsgz_gaJpZM4K314F>
.
|
Is it possible to make CAPTURE print its value when an unexpected exception occurs?
Currently, for the following code
I get
While without calling
foo()
it'sThe text was updated successfully, but these errors were encountered: