3 Provides exceptions used by the Distutils modules. Note that Distutils
4 modules may raise standard exceptions; in particular, SystemExit is
5 usually raised for errors that are obviously the end-user's fault
6 (eg. bad command-line arguments).
8 This module safe to use in "from ... import *" mode; it only exports
9 symbols whose names start with "Distutils" and end with "Error"."""
11 # created 1999/03/03, Greg Ward
17 if type (RuntimeError) is types
.ClassType
:
19 # DistutilsError is the root of all Distutils evil.
20 class DistutilsError (Exception):
23 # DistutilsModuleError is raised if we are unable to load an expected
24 # module, or find an expected class within some module
25 class DistutilsModuleError (DistutilsError
):
28 # DistutilsClassError is raised if we encounter a distribution or command
29 # class that's not holding up its end of the bargain.
30 class DistutilsClassError (DistutilsError
):
33 # DistutilsGetoptError (help me -- I have JavaProgrammersDisease!) is
34 # raised if the option table provided to fancy_getopt is bogus.
35 class DistutilsGetoptError (DistutilsError
):
38 # DistutilsArgError is raised by fancy_getopt in response to getopt.error;
39 # distutils.core then turns around and raises SystemExit from that. (Thus
40 # client code should never see DistutilsArgError.)
41 class DistutilsArgError (DistutilsError
):
44 # DistutilsFileError is raised for any problems in the filesystem:
45 # expected file not found, etc.
46 class DistutilsFileError (DistutilsError
):
49 # DistutilsOptionError is raised anytime an attempt is made to access
50 # (get or set) an option that does not exist for a particular command
51 # (or for the distribution itself).
52 class DistutilsOptionError (DistutilsError
):
55 # DistutilsValueError is raised anytime an option value (presumably
56 # provided by setup.py) is invalid.
57 class DistutilsValueError (DistutilsError
):
60 # DistutilsPlatformError is raised when we find that we don't
61 # know how to do something on the current platform (but we do
62 # know how to do it on some platform).
63 class DistutilsPlatformError (DistutilsError
):
66 # DistutilsExecError is raised if there are any problems executing
68 class DistutilsExecError (DistutilsError
):
71 # String-based exceptions
73 DistutilsError
= 'DistutilsError'
74 DistutilsModuleError
= 'DistutilsModuleError'
75 DistutilsClassError
= 'DistutilsClassError'
76 DistutilsGetoptError
= 'DistutilsGetoptError'
77 DistutilsArgError
= 'DistutilsArgError'
78 DistutilsFileError
= 'DistutilsFileError'
79 DistutilsOptionError
= 'DistutilsOptionError'
80 DistutilsValueError
= 'DistutilsValueError'
81 DistutilsPlatformError
= 'DistutilsPlatformError'
82 DistutilsExecError
= 'DistutilsExecError'