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
2
u/tyler1128 Apr 02 '26
That's an argument against exception, and have absolute failures like assertions or
panic!()to invoke rust. I'm not necessarily against that idea, but there does need to be a mechanism to handle recoverable errors. There are things outside your control that can cause unexpected failures.