|
Boost : |
From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2002-08-13 15:05:26
At Tuesday 2002/08/13 10:32, you wrote:
>----- Original Message -----
>From: "Victor A. Wagner, Jr." <vawjr_at_[hidden]>
>To: <boost_at_[hidden]>
>Sent: Tuesday, August 13, 2002 1:43 PM
>Subject: Re: [boost] Attempting resolution of Threads & Exceptions Issue
>
>
> > At Tuesday 2002/08/13 05:09, you wrote:
> > >From: "Victor A. Wagner, Jr." <vawjr_at_[hidden]>
> > > > At Monday 2002/08/12 14:22, you wrote:
> > > > >Dale wrote:
> > > > >
> > > > > >1) thread<void> threads call terminate(), thread<XXX> threads
> > >propogate the
> > > > > >exception when join is called.
> > > > >
> > > > >Propogating an exception in an different thread context than it
>started
> > > > >in (different stack, specifically) is a hard, if not impossible,
> > >problem.
> > > >
> > > > it seems trivial to me, providing that you can accurately asses what
>the
> > > > exception is!
> > >
> > >Aye, there's the rub. You can't "accurately asses what the exception
>is",
> > >since EH will catch base classes and in general there's no way to
>recover
> > >the most-derived class, even when catching by [const] reference.
> >
> > if you know, a priori, the set of possible exceptions, you can recover
>them.
>
>Even that's not enough; you need to know the order in which to look for
>them:
>
>try { something(); }
>catch(std::exception) {
> std::cout << "x";
>}
>catch(std::bad_alloc) {
> std::cout << "y";
>}
>
>Never prints "y".
of course. the texts I read on exceptions made this quite clear. I don't
see this as any sort of a "problem".
>-----------------------------------------------------------
> David Abrahams * Boost Consulting
>dave_at_[hidden] * http://www.boost-consulting.com
>
>
>_______________________________________________
>Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Victor A. Wagner Jr. http://rudbek.com
PGP RSA fingerprint = 4D20 EBF6 0101 B069 3817 8DBF C846 E47A
PGP D-H fingerprint = 98BC 65E3 1A19 43EC 3908 65B9 F755 E6F4 63BB 9D93
The five most dangerous words in the English language:
"There oughta be a law"
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk