R
Roy Smith
What is supposed to happen when an exception is raised and not caught in
a thread? The Reference Manual (section 4.2) states "When an exception
is not handled at all, the interpreter terminates execution of the
program, or returns to its interactive main loop", but it looks like
what really happens is the thread is terminated, not the whole program.
If I run the following:
-------
#!/usr/bin/env python
import time
import thread
def bogus ():
raise Exception
thread.start_new_thread (bogus, ())
while 1:
time.sleep (1)
print "still alive"
a thread? The Reference Manual (section 4.2) states "When an exception
is not handled at all, the interpreter terminates execution of the
program, or returns to its interactive main loop", but it looks like
what really happens is the thread is terminated, not the whole program.
If I run the following:
-------
#!/usr/bin/env python
import time
import thread
def bogus ():
raise Exception
thread.start_new_thread (bogus, ())
while 1:
time.sleep (1)
print "still alive"