]> git.ipfire.org Git - oddments/ddns.git/blame - src/ddns/errors.py
Catch various network/server errors.
[oddments/ddns.git] / src / ddns / errors.py
CommitLineData
f22ab085 1#!/usr/bin/python
3fdcb9d1
MT
2###############################################################################
3# #
4# ddns - A dynamic DNS client for IPFire #
5# Copyright (C) 2012 IPFire development team #
6# #
7# This program is free software: you can redistribute it and/or modify #
8# it under the terms of the GNU General Public License as published by #
9# the Free Software Foundation, either version 3 of the License, or #
10# (at your option) any later version. #
11# #
12# This program is distributed in the hope that it will be useful, #
13# but WITHOUT ANY WARRANTY; without even the implied warranty of #
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15# GNU General Public License for more details. #
16# #
17# You should have received a copy of the GNU General Public License #
18# along with this program. If not, see <http://www.gnu.org/licenses/>. #
19# #
20###############################################################################
f22ab085
MT
21
22class DDNSError(Exception):
23 pass
24
25
7a909224
MT
26class DDNSNetworkError(DDNSError):
27 pass
28
29
f22ab085
MT
30class DDNSAbuseError(DDNSError):
31 """
32 Thrown when the server reports
33 abuse for this account.
34 """
35 pass
36
37
38class DDNSAuthenticationError(DDNSError):
39 """
40 Thrown when the server did not
41 accept the user credentials.
42 """
43 pass
44
45
dcd7fc54
SS
46class DDNSBlockedError(DDNSError):
47 """
48 Thrown when the dynamic update client
49 (specified by the user-agent) has been blocked
50 by a dynamic DNS provider.
51 """
52 pass
53
54
2e2be9df
SS
55class DDNSConfigurationError(DDNSError):
56 """
57 Thrown when invalid or insufficient
58 data is provided by the configuration file.
59 """
60 pass
61
62
7a909224
MT
63class DDNSConnectionRefusedError(DDNSNetworkError):
64 """
65 Thrown when a connection is refused.
66 """
67 pass
68
69
70class DDNSConnectionTimeoutError(DDNSNetworkError):
71 """
72 Thrown when a connection to a server has timed out.
73 """
74 pass
75
76
1b8c6925
MT
77class DDNSHostNotFoundError(DDNSError):
78 """
79 Thrown when a configuration entry could
80 not be found.
81 """
82 pass
83
84
f22ab085
MT
85class DDNSInternalServerError(DDNSError):
86 """
87 Thrown when the remote server reported
88 an error on the provider site.
89 """
90 pass
91
92
7a909224
MT
93class DDNSNetworkUnreachableError(DDNSNetworkError):
94 """
95 Thrown when a network is not reachable.
96 """
97 pass
98
99
f22ab085
MT
100class DDNSRequestError(DDNSError):
101 """
102 Thrown when a request could
103 not be properly performed.
104 """
105 pass
106
107
7a909224
MT
108class DDNSServiceUnavailableError(DDNSNetworkError):
109 """
110 Equivalent to HTTP error code 503.
111 """
112 pass
113
114
f22ab085
MT
115class DDNSUpdateError(DDNSError):
116 """
117 Thrown when an update could not be
118 properly performed.
119 """
120 pass