Boost logo

Boost :

From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2002-08-13 14:27:30


At Tuesday 2002/08/13 08:16, you wrote:
>I agree,
>
>In a language where you would actually have access to (the traces of)
>the unwinding stack, it would be a bit different though, such as in
>Java. The origin of exception is there important both to properly
>identifying the source of problems and for certain debugging
>environments, letting you traverse that unwinded stack.
>
>People are afraid of an exception unwinding one stack and then (although
>cloned) unwinding part of another stack, in another thread. Scary!

That would indeed be scary, but your choice of the phrase "and then" is, I
belive, inappropriate and tends to obscure what is actually going on. Your
"and then" clearly has at lest one context switch in it...from the thread
which throws the exception to the one catching it. The exception isn't
"pushed" to the catching thread, it is reconstructed and re thrown only
when the receiving thread is "expecting" it.
When _I_ choose to call (for lack of a better word) some function, I should
be prepared to accept any exception it can throw. That this exceptional
condition originated in a separate thread is of _no_ interest to me. If it
were of interest it would certainly violate the tenets of OO (as I read
them); I'm supposed to be ignorant of the _implementation_ of the objects I
use.

>I would like someone to please try to explain that fear in detail, so I
>can understand why the thread-crossing exception is inherently evil...
>
>"I see dead exceptions..."
>
>/David

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