errorlist.py 480 B

1234567891011121314
  1. #!/usr/bin/env python3
  2. from textwrap import indent
  3. import borg.archiver # noqa: F401 - need import to get Error and ErrorWithTraceback subclasses.
  4. from borg.helpers import Error, ErrorWithTraceback
  5. classes = Error.__subclasses__() + ErrorWithTraceback.__subclasses__()
  6. for cls in sorted(classes, key=lambda cls: (cls.__module__, cls.__qualname__)):
  7. if cls is ErrorWithTraceback:
  8. continue
  9. print(" ", cls.__qualname__)
  10. print(indent(cls.__doc__, " " * 8))