MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _parse_value_tb

Function _parse_value_tb

tools/python-3.11.9-amd64/Lib/traceback.py:96–108  ·  view source on GitHub ↗
(exc, value, tb)

Source from the content-addressed store, hash-verified

94_sentinel = _Sentinel()
95
96def _parse_value_tb(exc, value, tb):
97 if (value is _sentinel) != (tb is _sentinel):
98 raise ValueError("Both or neither of value and tb must be given")
99 if value is tb is _sentinel:
100 if exc is not None:
101 if isinstance(exc, BaseException):
102 return exc, exc.__traceback__
103
104 raise TypeError(f'Exception expected for value, '
105 f'{type(exc).__name__} found')
106 else:
107 return None, None
108 return value, tb
109
110
111def print_exception(exc, /, value=_sentinel, tb=_sentinel, limit=None, \

Callers 2

print_exceptionFunction · 0.85
format_exceptionFunction · 0.85

Calls 1

typeClass · 0.50

Tested by

no test coverage detected