(thread)
| 1315 | local_sys = _sys |
| 1316 | |
| 1317 | def invoke_excepthook(thread): |
| 1318 | global excepthook |
| 1319 | try: |
| 1320 | hook = excepthook |
| 1321 | if hook is None: |
| 1322 | hook = old_excepthook |
| 1323 | |
| 1324 | args = ExceptHookArgs([*sys_exc_info(), thread]) |
| 1325 | |
| 1326 | hook(args) |
| 1327 | except Exception as exc: |
| 1328 | exc.__suppress_context__ = True |
| 1329 | del exc |
| 1330 | |
| 1331 | if local_sys is not None and local_sys.stderr is not None: |
| 1332 | stderr = local_sys.stderr |
| 1333 | else: |
| 1334 | stderr = thread._stderr |
| 1335 | |
| 1336 | local_print("Exception in threading.excepthook:", |
| 1337 | file=stderr, flush=True) |
| 1338 | |
| 1339 | if local_sys is not None and local_sys.excepthook is not None: |
| 1340 | sys_excepthook = local_sys.excepthook |
| 1341 | else: |
| 1342 | sys_excepthook = old_sys_excepthook |
| 1343 | |
| 1344 | sys_excepthook(*sys_exc_info()) |
| 1345 | finally: |
| 1346 | # Break reference cycle (exception stored in a variable) |
| 1347 | args = None |
| 1348 | |
| 1349 | return invoke_excepthook |
| 1350 |
nothing calls this directly
no test coverage detected
searching dependent graphs…