logoalt Hacker News

locknitpickertoday at 6:17 PM1 replyview on HN

> The entire point of the article is that you cannot throw from a destructor.

You need to read the article again because your assertion is patently false. You can throw and handle exceptions in destructors. What you cannot do is not catch those exceptions, because as per the standard uncaught exceptions will lead the application to be immediately terminated.


Replies

afioritoday at 8:43 PM

So inside a destructor throw has a radically different behaviour that makes it useless for communicating non-fatal errors

show 1 reply