code: def run(self):
          
          self.exc = None
          try:
              self.task()
          except BaseException:
              self.exc = sys.exc_info()
docs: Overwrites `threading.Thread.run`, to allow handling of exceptions thrown by threads
          from within the main app.