Base pprint for all exceptions.
(obj, p, cycle)
| 720 | |
| 721 | |
| 722 | def _exception_pprint(obj, p, cycle): |
| 723 | """Base pprint for all exceptions.""" |
| 724 | name = getattr(obj.__class__, '__qualname__', obj.__class__.__name__) |
| 725 | if obj.__class__.__module__ not in ('exceptions', 'builtins'): |
| 726 | name = '%s.%s' % (obj.__class__.__module__, name) |
| 727 | step = len(name) + 1 |
| 728 | p.begin_group(step, name + '(') |
| 729 | for idx, arg in enumerate(getattr(obj, 'args', ())): |
| 730 | if idx: |
| 731 | p.text(',') |
| 732 | p.breakable() |
| 733 | p.pretty(arg) |
| 734 | p.end_group(step, ')') |
| 735 | |
| 736 | |
| 737 | #: the exception base |
nothing calls this directly
no test coverage detected