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
1
u/Olipro Apr 02 '26
I have rarely had a situation where it's "Bad stuff happened in our destructor so we throw to communicate it"
But when I do, I check std::uncaught_exceptions and only throw if there aren't already bad things happening