(exc: BaseException, obj: object)
| 15 | |
| 16 | |
| 17 | def _format_repr_exception(exc: BaseException, obj: object) -> str: |
| 18 | try: |
| 19 | exc_info = _try_repr_or_str(exc) |
| 20 | except (KeyboardInterrupt, SystemExit): |
| 21 | raise |
| 22 | except BaseException as inner_exc: |
| 23 | exc_info = f"unpresentable exception ({_try_repr_or_str(inner_exc)})" |
| 24 | return ( |
| 25 | f"<[{exc_info} raised in repr()] {type(obj).__name__} object at 0x{id(obj):x}>" |
| 26 | ) |
| 27 | |
| 28 | |
| 29 | def _ellipsize(s: str, maxsize: int) -> str: |
no test coverage detected