Guest User

Untitled

a guest
Jun 24th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1.         try:
  2.             self.worker(args)
  3.         except Exception as e:
  4.             self.parent.log('Thread exception in threads._worker: %s' % str(e), '!', tid=tid)
  5.             print(traceback.print_exc(file=sys.stdout))
  6.  
  7.             e = str(e)
  8.             tb = sys.exc_info()[2]
  9.             if tb:
  10.                 tb = ''.join(traceback.format_tb(tb))
  11.             else:
  12.                 tb = 'Not detected'
  13.  
  14.             with open('SQLITE_THREAD_'+str(tid)+'_CRASHED', 'w') as fp:
  15.                 fp.write(e +' --- '+ tb)
Add Comment
Please, Sign In to add comment