X-Git-Url: http://git.ipfire.org/?p=oddments%2Fddns.git;a=blobdiff_plain;f=src%2Fddns%2Ferrors.py;fp=src%2Fddns%2Ferrors.py;h=f9cc3f627a7e88c7f5e8e14fc7d6256461c417ee;hp=cd935d032001e65dfa25d08c82d2738f25fc9e59;hb=7a9092247370fa6b2b76ba858063bad16d06b016;hpb=cbebe191e28fd66cc7804b2eb54fdd84500c083f diff --git a/src/ddns/errors.py b/src/ddns/errors.py index cd935d0..f9cc3f6 100644 --- a/src/ddns/errors.py +++ b/src/ddns/errors.py @@ -23,6 +23,10 @@ class DDNSError(Exception): pass +class DDNSNetworkError(DDNSError): + pass + + class DDNSAbuseError(DDNSError): """ Thrown when the server reports @@ -56,6 +60,20 @@ class DDNSConfigurationError(DDNSError): pass +class DDNSConnectionRefusedError(DDNSNetworkError): + """ + Thrown when a connection is refused. + """ + pass + + +class DDNSConnectionTimeoutError(DDNSNetworkError): + """ + Thrown when a connection to a server has timed out. + """ + pass + + class DDNSHostNotFoundError(DDNSError): """ Thrown when a configuration entry could @@ -72,6 +90,13 @@ class DDNSInternalServerError(DDNSError): pass +class DDNSNetworkUnreachableError(DDNSNetworkError): + """ + Thrown when a network is not reachable. + """ + pass + + class DDNSRequestError(DDNSError): """ Thrown when a request could @@ -80,6 +105,13 @@ class DDNSRequestError(DDNSError): pass +class DDNSServiceUnavailableError(DDNSNetworkError): + """ + Equivalent to HTTP error code 503. + """ + pass + + class DDNSUpdateError(DDNSError): """ Thrown when an update could not be