From: David Abrahams (dave_at_[hidden])
Date: 2003-03-23 08:11:02
Gennaro Prota <gennaro_prota_at_[hidden]> writes:
> On Sat, 22 Mar 2003 09:38:49 -0500, David Abrahams
> <dave_at_[hidden]> wrote:
>>David Abrahams <dave_at_[hidden]> writes:
>>> Damn, maybe I need to update more/error_handling.html
> Just some notes:
> - "Don't embed a std::string object or any other data member or base
> class whose copy constructor could throw an exception. That could lead
> to termination during stack unwinding."
> I think you meant *before* (any) stack unwinding (unless you are
> thinking to catch by value, but that's highly unlikely)
I don't actually know whether it's before or after, but it's at the
stage described by 15.1/3, so I'll clarify that.
> - "Similarly, it's a bad idea to use a base or member whose ordinary
> constructor might throw, because, though not fatal, you will report a
> different exception"
> Of course it *may* be fatal as well; it's just /not necessarily/ so.
> It may not lead you straight to terminate (if you have a handler for
> the different exception) but can in practice put the program in a
> disastrous state.
OK, I guess. In general a well-written program won't enter a
disastrous state if you throw exception A instead of exception B at
any given point. That's part of the reason exception-specifications
aren't worth the trouble.
I can change it to "though it may not be fatal" without feeling like
> - In section "What About Programmer Errors?" there's a little typo:
> "neccessary" (two 'C's)
> - at the beginning of the paper, there's a link to 'Generic
> Programming, Proc. of a Dagstuhl Seminar...' I was about to report the
> error in the "date" (1766) :-) Maybe it would be better to write
> "Volume 1766"?
I just copied the official reference text, and never knew where that
number came from. Is it really a volume number?
Thanks for your remarks!
-- Dave Abrahams Boost Consulting 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