Thread exception handling

merge-requests/26/head
Bob Mottram 2021-09-15 17:08:41 +01:00
parent bb59ef07de
commit 5ab2e97605
1 changed files with 6 additions and 2 deletions

View File

@ -46,8 +46,12 @@ class threadWithTrace(threading.Thread):
def __run(self):
sys.settrace(self.globaltrace)
self.__run_backup()
self.run = self.__run_backup
try:
self.__run_backup()
self.run = self.__run_backup
except Exception as e:
print('ERROR: threads.py/__run failed - ' + str(e))
pass
def globaltrace(self, frame, event, arg):
if event == 'call':