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