Boost logo

Boost :

From: Eric Woodruff (Eric.Woodruff_at_[hidden])
Date: 2002-08-12 19:26:19


Sure, the details of how to handle unexpected exceptions are up for debate.
Originally, bad_exception seemed fitting to me, but giving std::exceptions
special treatment by borrowing its .what () can be useful. Have you reviewed
my implementation?

Anyhow, a boost::tuple is used to list the exceptions (which AFAIK supports
infinite recursion, limited by the compiler of course). My proposed
implementation only accepted up to 10 exceptions as parameters to the
throws_exceptions policy, however, the user could easily construct their own
tuple for which they would like the boost::thread to support.

----- Original Message -----
From: William E. Kempf
Newsgroups: gmane.comp.lib.boost.devel
Sent: Monday, 2002:August:12 7:31 PM
Subject: Re: Re: Attempting resolution of Threads & Exceptions Issue

----- Original Message -----
From: "Eric Woodruff" <Eric.Woodruff_at_[hidden]>
> [Un?]fortunatly, as far as I know, the end user is required to specifiy
the
> exceptions they would like propagated.

Are they? If we agree to this, then the argument that others have made
about library threads terminating is now a complete non-argument... unless
you expect to be able to specify the (theoretically) infinite number of
exceptions that could occur.

But I'm not sure this premise is true. The easiest implementation would be
to convert all unhandled exceptions into a single thread_terminated
exception during propogation (possibly being nice enough to duplicate the
what() results of std::exceptions). Even if we go the extra mile of
providing propogation of specified exception types as-is, we can still
translate all other exception types as thread_terminated, or in this case a
better named unexpected_thread_termination.

Bill Kempf
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost


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