MCPcopy Index your code
hub / github.com/python/cpython / _log_on_exception

Function _log_on_exception

Lib/asyncio/tasks.py:911–927  ·  view source on GitHub ↗
(fut)

Source from the content-addressed store, hash-verified

909
910
911def _log_on_exception(fut):
912 if fut.cancelled():
913 return
914
915 exc = fut.exception()
916 if exc is None:
917 return
918
919 context = {
920 'message':
921 f'{exc.__class__.__name__} exception in shielded future',
922 'exception': exc,
923 'future': fut,
924 }
925 if fut._source_traceback:
926 context['source_traceback'] = fut._source_traceback
927 fut._loop.call_exception_handler(context)
928
929
930def shield(arg):

Callers

nothing calls this directly

Calls 3

cancelledMethod · 0.45
exceptionMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…