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

Function unpack_exception

Lib/test/test_interpreters/utils.py:66–75  ·  view source on GitHub ↗
(packed)

Source from the content-addressed store, hash-verified

64
65
66def unpack_exception(packed):
67 try:
68 data = json.loads(packed)
69 except json.decoder.JSONDecodeError as e:
70 logging.getLogger(__name__).warning('incomplete exception data', exc_info=e)
71 print(packed if isinstance(packed, str) else packed.decode('utf-8'))
72 return None
73 exc = types.SimpleNamespace(**data)
74 exc.type = types.SimpleNamespace(**exc.type)
75 return exc;
76
77
78class CapturingResults:

Callers 1

_unpack_excMethod · 0.85

Calls 4

getLoggerMethod · 0.80
loadsMethod · 0.45
warningMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…