Boost logo

Boost :

From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2002-08-13 16:38:42


At Tuesday 2002/08/13 13:25, you wrote:
>Here's another alternative. Instead of relying on the reference-catching
>mechanism, which properly deletes behind the scenes, the user can use
>handles (shared_ptrs) of their exception they want to catch. They can easily
>allocate their implementation of an abstract exception type on the heap and
>pass it through correctly.
>
>As long as the shared_ptr paradigm for hierarchical exceptions is used
>consistently, there is no problem. (That is unless the compiler has trouble
>receiving a boost::shared_ptr<std::invalid_argument> as a
>boost::shared_ptr<std::exception>.)
>
>Using the paradigm ubiquitously eliminates the fork between threaded and
>non-threaded versions of their functions and allows hierarchical exception
>specifications to thread<>.

Of course such pointers/references would have to be to objects which will
survive the termination of the "excepting" thread. Or are you suggesting
that we should 'hold' resources (assuming we can identify them) in the
excepting thread until "join()" is called?

[deleted original message]
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