<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def run(self):
 """Overwrites `threading.Thread.run`, to allow handling of exceptions thrown by threads from within the main app."""

        self.exc = None
        try:
            self.task()
        except BaseException:
            self.exc = sys.exc_info()