4 ms·
The author complains about his own misunderstanding of, and consequent misuse of exceptions. Put all your cleanup in destructors. All of it. They exercise that
by ncmncm 4y ago
The author complains about his own misunderstanding of, and consequent misuse of exceptions.
Put all your cleanup in destructors. All of it. They exercise that code all the time, on every run. Then, throwing always does the right thing, with no extra effort.
- JonChesterfield 4y agoGood thing cleanup code can never fail, what with there being no way to report failure from a destructor.