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