]> projects.mako.cc - wikipedia-api-cdsw/blob - mwclient/errors.py
added example code that uses the urls
[wikipedia-api-cdsw] / mwclient / errors.py
1 class MwClientError(RuntimeError):
2     pass
3
4
5 class MediaWikiVersionError(MwClientError):
6     pass
7
8
9 class APIDisabledError(MwClientError):
10     pass
11
12
13 class HTTPError(MwClientError):
14     pass
15
16
17 class HTTPStatusError(MwClientError):
18     pass
19
20
21 class HTTPRedirectError(HTTPError):
22     pass
23
24
25 class MaximumRetriesExceeded(MwClientError):
26     pass
27
28
29 class APIError(MwClientError):
30
31     def __init__(self, code, info, kwargs):
32         self.code = code
33         self.info = info
34         MwClientError.__init__(self, code, info, kwargs)
35
36
37 class InsufficientPermission(MwClientError):
38     pass
39
40
41 class UserBlocked(InsufficientPermission):
42     pass
43
44
45 class EditError(MwClientError):
46     pass
47
48
49 class ProtectedPageError(EditError, InsufficientPermission):
50     pass
51
52
53 class FileExists(EditError):
54     pass
55
56
57 class LoginError(MwClientError):
58     pass
59
60
61 class EmailError(MwClientError):
62     pass
63
64
65 class NoSpecifiedEmail(EmailError):
66     pass

Benjamin Mako Hill || Want to submit a patch?