Boost logo

Boost :

From: Reid Sweatman (reids_at_[hidden])
Date: 1999-07-07 17:50:13


> Only if it were buggy, or if the user code didn't honored
> its contract (like don't throw in dtor ect)

Well, that's the danger, isn't it? Especially with template container
classes, that the user may define something in the container that *can*
throw, and that's not the sort of thing you can know about when writing a
generic template for others to use.

> Err, no, you don't get the ``unexpected'' exception
> (std::bad_exception) with an empty throw spec you
> get a call to terminate (just to make it clear).

I may be misunderstanding. You'd get unexpected if whoever intercepted it
(the outermost safety net, at the least) didn't know what to do with it.
Are you saying that an undecorated member function will terminate rather
than throw, if something inside it does unexpectedly throw? I didn't think
it worked that way. I understood it to mean that terminate was invoked if
either main() failed to catch the exception, the default unexpected handler
was invoked, or a DTOR invoked by an exception threw. I don't see that any
of the three would apply in the situation we're talking about. What am I
missing?

------------------------------------------------------------------------

eGroups.com home: http://www.egroups.com/group/boost
http://www.egroups.com - Simplifying group communications


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk