thread_exc2.py 202 B

12345678910
  1. # test raising exception within thread which is not caught
  2. import utime
  3. import _thread
  4. def thread_entry():
  5. raise ValueError
  6. _thread.start_new_thread(thread_entry, ())
  7. utime.sleep(1)
  8. print('done')