• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 DistutilsFileError (DistutilsError):
21    """Any problems in the filesystem: expected file not found, etc.
22    Typically this is for problems that we detect before OSError
23    could be raised."""
24    pass
25
26class DistutilsPlatformError (DistutilsError):
27    """We don't know how to do something on the current platform (but
28    we do know how to do it on some platform) -- eg. trying to compile
29    C files on a platform not supported by a CCompiler subclass."""
30    pass
31
32class DistutilsExecError (DistutilsError):
33    """Any problems executing an external program (such as the C
34    compiler, when compiling C files)."""
35    pass
36
37# Exception classes used by the CCompiler implementation classes
38class CCompilerError (Exception):
39    """Some compile/link operation failed."""
40
41class PreprocessError (CCompilerError):
42    """Failure to preprocess one or more C/C++ files."""
43
44class CompileError (CCompilerError):
45    """Failure to compile one or more C/C++ source files."""
46
47class UnknownFileError (CCompilerError):
48    """Attempt to process an unknown file type."""
49