(exc, value, tb)
| 111 | _sentinel = _Sentinel() |
| 112 | |
| 113 | def _parse_value_tb(exc, value, tb): |
| 114 | if (value is _sentinel) != (tb is _sentinel): |
| 115 | raise ValueError("Both or neither of value and tb must be given") |
| 116 | if value is tb is _sentinel: |
| 117 | if exc is not None: |
| 118 | if isinstance(exc, BaseException): |
| 119 | return exc, exc.__traceback__ |
| 120 | |
| 121 | raise TypeError(f'Exception expected for value, ' |
| 122 | f'{type(exc).__name__} found') |
| 123 | else: |
| 124 | return None, None |
| 125 | return value, tb |
| 126 | |
| 127 | |
| 128 | def print_exception(exc, /, value=_sentinel, tb=_sentinel, limit=None, \ |
no outgoing calls
no test coverage detected
searching dependent graphs…