|
Boost : |
From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2004-03-11 11:02:58
On Wed, 10 Mar 2004 08:22:02 -0500, David Abrahams
<dave_at_[hidden]> wrote:
>Gennaro Prota <gennaro_prota_at_[hidden]> writes:
>
>> Well, yes, but it seemed that Peter was making a more general point
>> ("any catch that can be replaced", not just catch(...))
>
>...and what other catches can be replaced by RAII?
Am I missing something? If you know that the only exceptions that will
be thrown from the try block are bad_alloc or derived, isn't (broken
environments apart) catch(const bad_alloc&) the same as catch(...)?
Anyway, Peter was rather considering:
a) whether non-C++ exceptions are mapped into C++ EH
b) whether stack unwinding is enabled for non-C++ exceptions
c) whether stack unwinding happens for unhandled exceptions
Personally, I don't think libraries should be concerned with b) and
c). At least they could cleanup their own things and then let the user
do whatever he wants with the rest. No?
-- Genny.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk