
Gennaro Prota <gennaro_prota@yahoo.com> writes:
On Wed, 10 Mar 2004 08:22:02 -0500, David Abrahams <dave@boost-consulting.com> wrote:
Gennaro Prota <gennaro_prota@yahoo.com> 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?
I think if you review this thread you'll see that there's no argument. -- Dave Abrahams Boost Consulting www.boost-consulting.com