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