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()