Catch uncaught exceptions and save them to t.exc. Necessary to remove unwanted "Exception ignored in thread started by..." and "Exception ignored in sys.unraisablehook..." https://stackoverflow.com/a/31614591
(self)
| 130 | """ |
| 131 | |
| 132 | def run(self): |
| 133 | """ |
| 134 | Catch uncaught exceptions and save them to t.exc. |
| 135 | Necessary to remove unwanted "Exception ignored in thread started by..." and "Exception ignored in sys.unraisablehook..." |
| 136 | https://stackoverflow.com/a/31614591 |
| 137 | """ |
| 138 | self.exc = None |
| 139 | try: |
| 140 | self.ret = self._target(*self._args, **self._kwargs) # type: ignore |
| 141 | except Exception as e: |
| 142 | self.exc = e |
| 143 | |
| 144 | def raiseException(self, ExceptionClass): |
| 145 | """ |
no outgoing calls
no test coverage detected