5 ms·
Except you are not supposed to throw in a destructor.
by Koshkin 5y ago
Except you are not supposed to throw in a destructor.
- synergy20 5y agohttps://www.cs.technion.ac.il/users/yechiel/c++-faq/dtors-shouldnt-throw.html https://www.cs.technion.ac.il/users/yechiel/c++-faq/dtors-sh... but what if dtor fails(e.g. can't release a resource), is the by-default action terminate or ignore?
- Koshkin 5y agoWell, the "environment" may decide for you in some cases, but there is no default action as such. You log an error and either terminate or ignore - depending on which causes less harm.