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 is safe to use in "from ... import *" mode; it only exports
9 symbols whose names start with "Distutils" and end with "Error"."""
13 class DistutilsError (Exception):
14 """The root of all Distutils evil."""
17 class DistutilsModuleError (DistutilsError
):
18 """Unable to load an expected module, or to find an expected class
19 within some module (in particular, command modules and classes)."""
22 class DistutilsClassError (DistutilsError
):
23 """Some command class (or possibly distribution class, if anyone
24 feels a need to subclass Distribution) is found not to be holding
25 up its end of the bargain, ie. implementing some part of the
26 "command "interface."""
29 class DistutilsGetoptError (DistutilsError
):
30 """The option table provided to 'fancy_getopt()' is bogus."""
33 class DistutilsArgError (DistutilsError
):
34 """Raised by fancy_getopt in response to getopt.error -- ie. an
35 error in the command line usage."""
38 class DistutilsFileError (DistutilsError
):
39 """Any problems in the filesystem: expected file not found, etc.
40 Typically this is for problems that we detect before IOError or
41 OSError could be raised."""
44 class DistutilsOptionError (DistutilsError
):
45 """Syntactic/semantic errors in command options, such as use of
46 mutually conflicting options, or inconsistent options,
47 badly-spelled values, etc. No distinction is made between option
48 values originating in the setup script, the command line, config
49 files, or what-have-you -- but if we *know* something originated in
50 the setup script, we'll raise DistutilsSetupError instead."""
53 class DistutilsSetupError (DistutilsError
):
54 """For errors that can be definitely blamed on the setup script,
55 such as invalid keyword arguments to 'setup()'."""
58 class DistutilsPlatformError (DistutilsError
):
59 """We don't know how to do something on the current platform (but
60 we do know how to do it on some platform) -- eg. trying to compile
61 C files on a platform not supported by a CCompiler subclass."""
64 class DistutilsExecError (DistutilsError
):
65 """Any problems executing an external program (such as the C
66 compiler, when compiling C files)."""
69 class DistutilsInternalError (DistutilsError
):
70 """Internal inconsistencies or impossibilities (obviously, this
71 should never be seen if the code is working!)."""
74 class DistutilsTemplateError (DistutilsError
):
75 """Syntax error in a file list template."""
78 # Exception classes used by the CCompiler implementation classes
79 class CCompilerError (Exception):
80 """Some compile/link operation failed."""
82 class PreprocessError (CCompilerError
):
83 """Failure to preprocess one or more C/C++ files."""
85 class CompileError (CCompilerError
):
86 """Failure to compile one or more C/C++ source files."""
88 class LibError (CCompilerError
):
89 """Failure to create a static library from one or more C/C++ object
92 class LinkError (CCompilerError
):
93 """Failure to link one or more C/C++ object files into an executable
94 or shared library file."""
96 class UnknownFileError (CCompilerError
):
97 """Attempt to process an unknown file type."""