Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

error.py 2.0KB

1 year ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # -*- test-case-name: twisted.names.test -*-
  2. # Copyright (c) Twisted Matrix Laboratories.
  3. # See LICENSE for details.
  4. """
  5. Exception class definitions for Twisted Names.
  6. """
  7. from twisted.internet.defer import TimeoutError
  8. class DomainError(ValueError):
  9. """
  10. Indicates a lookup failed because there were no records matching the given
  11. C{name, class, type} triple.
  12. """
  13. class AuthoritativeDomainError(ValueError):
  14. """
  15. Indicates a lookup failed for a name for which this server is authoritative
  16. because there were no records matching the given C{name, class, type}
  17. triple.
  18. """
  19. class DNSQueryTimeoutError(TimeoutError):
  20. """
  21. Indicates a lookup failed due to a timeout.
  22. @ivar id: The id of the message which timed out.
  23. """
  24. def __init__(self, id):
  25. TimeoutError.__init__(self)
  26. self.id = id
  27. class DNSFormatError(DomainError):
  28. """
  29. Indicates a query failed with a result of C{twisted.names.dns.EFORMAT}.
  30. """
  31. class DNSServerError(DomainError):
  32. """
  33. Indicates a query failed with a result of C{twisted.names.dns.ESERVER}.
  34. """
  35. class DNSNameError(DomainError):
  36. """
  37. Indicates a query failed with a result of C{twisted.names.dns.ENAME}.
  38. """
  39. class DNSNotImplementedError(DomainError):
  40. """
  41. Indicates a query failed with a result of C{twisted.names.dns.ENOTIMP}.
  42. """
  43. class DNSQueryRefusedError(DomainError):
  44. """
  45. Indicates a query failed with a result of C{twisted.names.dns.EREFUSED}.
  46. """
  47. class DNSUnknownError(DomainError):
  48. """
  49. Indicates a query failed with an unknown result.
  50. """
  51. class ResolverError(Exception):
  52. """
  53. Indicates a query failed because of a decision made by the local
  54. resolver object.
  55. """
  56. __all__ = [
  57. "DomainError",
  58. "AuthoritativeDomainError",
  59. "DNSQueryTimeoutError",
  60. "DNSFormatError",
  61. "DNSServerError",
  62. "DNSNameError",
  63. "DNSNotImplementedError",
  64. "DNSQueryRefusedError",
  65. "DNSUnknownError",
  66. "ResolverError",
  67. ]