
15 May
2004
15 May
'04
3:41 p.m.
"Andrei Alexandrescu (See Website for Email)" wrote: [...]
What does it/should it do if the guard function throws an exception? Is there some try/catch in ScopeGuard's destructor?
I was never sure what to do there. You can't pass an error out, you can't throw... and to keep the library general, you can't do something like logging or writing to cerr. Any ideas?
Destructors shall have implicit throw() exception specification. std::unexpected() shall be invoked at throw point (there shall be no unwinding at all). Two-phase EH is the way to go. regards, alexander. -- http://groups.google.com/groups?selm=40A4A365.85EC6B78%40web.de