]> git.ipfire.org Git - oddments/ddns.git/blobdiff - src/ddns/errors.py
Catch SSL errors
[oddments/ddns.git] / src / ddns / errors.py
index 293b4eb8f58510c8e1c8d6218220e80584c8eb10..58a5ba9beb0e0342d51d21dc7e140c3cbc591483 100644 (file)
@@ -64,6 +64,13 @@ class DDNSBlockedError(DDNSError):
        reason = N_("The server denies any updates from this client")
 
 
+class DDNSCertificateError(DDNSError):
+       """
+               Thrown when a server presented an invalid certificate.
+       """
+       reason = N_("Invalid certificate")
+
+
 class DDNSConfigurationError(DDNSError):
        """
                Thrown when invalid or insufficient
@@ -109,6 +116,13 @@ class DDNSNetworkUnreachableError(DDNSNetworkError):
        reason = N_("Network unreachable")
 
 
+class DDNSNoRouteToHostError(DDNSNetworkError):
+       """
+               Thrown when there is no route to a host.
+       """
+       reason = N_("No route to host")
+
+
 class DDNSNotFound(DDNSError):
        """
                Thrown when the called URL has not been found
@@ -132,6 +146,14 @@ class DDNSResolveError(DDNSNetworkError):
        reason = N_("Could not resolve DNS entry")
 
 
+class DDNSSSLError(DDNSNetworkError):
+       """
+               Raised when a SSL connection could not be
+               negotiated.
+       """
+       reason = N_("SSL negotiation error")
+
+
 class DDNSServiceUnavailableError(DDNSNetworkError):
        """
                Equivalent to HTTP error code 503.