|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2002-08-02 09:01:04
From: "Thomas Witt" <witt_at_[hidden]>
> > In this case it might even make sense just to
> > eat any exceptions that occur during destruction with catch(...){}, but
you
> > need to do the careful analysis to decide what is appropriate. Allowing
> > destructors to throw during unwinding is IMO simply unacceptable.
>
> As Daryle mentioned this fix depends on language features that are not
widely
> available. It works for VC.NET and gcc3 but fails for MWC7.2, gcc2.95.3
and
> MSVC6. IIRC that means that for the latter the problem is actually
unfixable.
Eating the exception is a viable approach on any of these platforms, and
may be preferable to termination when uncaught_exception is unavailable.
> IMHO finding the right semantics isn't easy.
Nobody claimed it would be. However, a library author must take
responsibility for the consequences of his code. The hard work must be
done.
-----------------------------------------------------------
David Abrahams * Boost Consulting
dave_at_[hidden] * http://www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk