ewords.py 623 B

12345678910111213141516171819202122232425262728293031323334
  1. # -*- test-case-name: twisted.words.test -*-
  2. # Copyright (c) Twisted Matrix Laboratories.
  3. # See LICENSE for details.
  4. """Exception definitions for Words
  5. """
  6. class WordsError(Exception):
  7. def __str__(self):
  8. return self.__class__.__name__ + ': ' + Exception.__str__(self)
  9. class NoSuchUser(WordsError):
  10. pass
  11. class DuplicateUser(WordsError):
  12. pass
  13. class NoSuchGroup(WordsError):
  14. pass
  15. class DuplicateGroup(WordsError):
  16. pass
  17. class AlreadyLoggedIn(WordsError):
  18. pass
  19. __all__ = [
  20. 'WordsError', 'NoSuchUser', 'DuplicateUser',
  21. 'NoSuchGroup', 'DuplicateGroup', 'AlreadyLoggedIn',
  22. ]