howdoI: Exception in thread - terminating the program?
Ville Vainio
vvainio at karhu.tp.spt.fi
Tue Jul 17 01:50:44 EDT 2001
Is there some "standard" or canonical way to make programs die when an
unhandled exception occurs in a thread (other than main)? Off the top
of my head, I can think of having a threading.Event blocking at the
main, all threads set to Daemons, and having the run() in catch-all
try-except block (and save/print traceback, trigger the blocking event
in main inside except).
Am I missing some obvious, easier method? How do you people handle
such cases in your own projects? I do know that eventually all
exceptions will be handled in their proper places, but just to prepare
for the unexpected... (no pun intended)
--
Ville Vainio - http://www.tp.spt.fi/~vvainio - ICQ #115524762
Wild geese have no intention to cast a reflection
Water has no mind to assume their form
More information about the Python-list
mailing list