PageRenderTime 19ms CodeModel.GetById 11ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

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