raise third argument question
Campbell
cb921 at voice.co.za
Sat Dec 1 16:47:21 EST 2001
Hi, I have confusion perhaps someone has sorted out for themselves
already...?
>From the raise documentation:
"""
If a third object is present, and it is not None, it should be a
traceback object (see section 3.2), and it is substituted instead of the
current location as the place where the exception occurred. This is
useful to re-raise an exception transparently in an except clause.
"""
I don't suppose it would be possible to stick a pin in another running
thread with the raise statement and a suitable third parameter?
My threads are all execfile()'ing bits of code written by people other
than myself, and sometimes they are not too bright about using tight
while 1: loops, and other nasties, which do not include any of the
functions which I have peppered with _hangup_check()'s (currently a
hangup check will raise it's own exception if the object's .'alive'
member is set down to 0). Rather than have to come to the office and
bounce my server once a couple of these have collected up, I would like
to raise an error in the thread when the caller hangs up - and have that
exception arise within that thread.
*prays*
Please let this be possible - i have a long-running headache :)
Thanks for any help..
campbell
--
Let us not forget..
There is hope.
Keep hope alive.
More information about the Python-list
mailing list