1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 """All MySQL exceptions.
30
31 This package contains all exceptions for the MySQL library. All exceptions
32 from the submodules are imported into the top-level of this package so you do
33 not need to import any of the specific submodules.
34
35 There is a base exception `Error` for all exceptions.
36
37 There is generally two types of exceptions. The ones that derive from
38 `MySQL_Error` are the ones that have a MySQL error code and are probably
39 generated by MySQL itself. The others do not derive from `MySQL_Error` and are
40 generated by this Python library (these can be found in the
41 `mysql.exceptions.internal` module).
42
43 All errors that MySQL can generate have been given their own exception object.
44 These are generally the error code from the C library converted to bumpy case
45 with a few underscores added here and there to make them slightly more
46 readable.
47
48 Note that the MySQL API is somewhat inconsistent in its naming convention.
49 Sometimes the error code ends with ``_ERROR`` and sometimes it doesn't.
50 Although I'm tempted to normalize the naming scheme, I figure it might make
51 issues more confusing.
52
53 A modest attempt has been made to include the potential exceptions that might
54 be risen by various methods throughout this Python library in the docstrings.
55 This is mainly based on the MySQL documentation. However, it is very far from
56 complete. Particularly, errors that are risen from the server side (those found
57 in `mysql.exceptions.server`) are generally not addressed at all in the
58 docstrings. This would be a monumental task to try to identify them all and
59 properly document them. It also might create too much noise, because many of
60 the server-side errors are not ones you would normally bother to catch.
61 """
62
63 __version__ = '$Revision: 1.3 $'
64
65 from mysql.exceptions.base import *
66 from mysql.exceptions.client import *
67 from mysql.exceptions.internal import *
68 from mysql.exceptions.server import *
69 from mysql.exceptions.map import raise_error
70