r/cpp • • Apr 02 '26

What happens when a destructor throws

https://www.sandordargo.com/blog/2026/04/01/when-a-destructor-throws
102 Upvotes

48 comments sorted by

View all comments

Show parent comment

1

u/tyler1128 Apr 03 '26

That is both the largest benefit and largest problem with them, depending who you ask. Not having to think about the unhappy path, and the non-local control flow of it, makes robust error handling harder. It does make the logic of the expected path generally easier.