]> projects.mako.cc - wikipedia-api-cdsw/blob - mwclient/errors.py
6540c2d73e2d69da9c16f5c4c4845da517e14124
[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 MaximumRetriesExceeded(MwClientError):
14     pass
15
16
17 class APIError(MwClientError):
18
19     def __init__(self, code, info, kwargs):
20         self.code = code
21         self.info = info
22         MwClientError.__init__(self, code, info, kwargs)
23
24
25 class InsufficientPermission(MwClientError):
26     pass
27
28
29 class UserBlocked(InsufficientPermission):
30     pass
31
32
33 class EditError(MwClientError):
34     pass
35
36
37 class ProtectedPageError(EditError, InsufficientPermission):
38     pass
39
40
41 class FileExists(EditError):
42     pass
43
44
45 class LoginError(MwClientError):
46     pass
47
48
49 class EmailError(MwClientError):
50     pass
51
52
53 class NoSpecifiedEmail(EmailError):
54     pass
55
56
57 class NoWriteApi(MwClientError):
58     pass

Benjamin Mako Hill || Want to submit a patch?