r/cpp • u/pavel_v • Apr 02 '26
What happens when a destructor throws
https://www.sandordargo.com/blog/2026/04/01/when-a-destructor-throws
102
Upvotes
r/cpp • u/pavel_v • Apr 02 '26
View all comments
Show parent comment
4
u/The_JSQuareD Apr 02 '26
Wow, nuances upon nuances in this.
It never would have occurred to me that an exception gets implicitly rethrown from a function catch block for a destructor. What's the reason for that behavior?