Boost logo

Boost :

From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2004-05-15 10:41:36

"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.



Boost list run by bdawes at, gregod at, cpdaniel at, john at