2016-12-29 13:12:06 +11:00
|
|
|
# test raising exception within thread which is not caught
|
|
|
|
import utime
|
|
|
|
import _thread
|
|
|
|
|
2021-03-15 19:27:36 +05:30
|
|
|
|
2016-12-29 13:12:06 +11:00
|
|
|
def thread_entry():
|
|
|
|
raise ValueError
|
|
|
|
|
2021-03-15 19:27:36 +05:30
|
|
|
|
2016-12-29 13:12:06 +11:00
|
|
|
_thread.start_new_thread(thread_entry, ())
|
|
|
|
utime.sleep(1)
|
2021-03-15 19:27:36 +05:30
|
|
|
print("done")
|