1999-03-22 10:52:19 -04:00
|
|
|
"""distutils.errors
|
|
|
|
|
|
|
|
Provides exceptions used by the Distutils modules. Note that Distutils
|
|
|
|
modules may raise standard exceptions; in particular, SystemExit is
|
|
|
|
usually raised for errors that are obviously the end-user's fault
|
|
|
|
(eg. bad command-line arguments).
|
|
|
|
|
2002-11-13 21:58:48 -04:00
|
|
|
This module is safe to use in "from ... import *" mode; it only exports
|
1999-03-22 10:52:19 -04:00
|
|
|
symbols whose names start with "Distutils" and end with "Error"."""
|
|
|
|
|
2010-07-22 09:50:05 -03:00
|
|
|
class DistutilsError (Exception):
|
2000-05-29 23:02:14 -03:00
|
|
|
"""The root of all Distutils evil."""
|
2010-07-22 09:50:05 -03:00
|
|
|
pass
|
2000-05-29 23:02:14 -03:00
|
|
|
|
2010-07-22 09:50:05 -03:00
|
|
|
class DistutilsModuleError (DistutilsError):
|
2000-05-29 23:02:14 -03:00
|
|
|
"""Unable to load an expected module, or to find an expected class
|
|
|
|
within some module (in particular, command modules and classes)."""
|
2010-07-22 09:50:05 -03:00
|
|
|
pass
|
2000-05-29 23:02:14 -03:00
|
|
|
|
2010-07-22 09:50:05 -03:00
|
|
|
class DistutilsClassError (DistutilsError):
|
2000-05-29 23:02:14 -03:00
|
|
|
"""Some command class (or possibly distribution class, if anyone
|
|
|
|
feels a need to subclass Distribution) is found not to be holding
|
|
|
|
up its end of the bargain, ie. implementing some part of the
|
|
|
|
"command "interface."""
|
2010-07-22 09:50:05 -03:00
|
|
|
pass
|
2000-05-29 23:02:14 -03:00
|
|
|
|
2010-07-22 09:50:05 -03:00
|
|
|
class DistutilsGetoptError (DistutilsError):
|
2000-05-29 23:02:14 -03:00
|
|
|
"""The option table provided to 'fancy_getopt()' is bogus."""
|
2010-07-22 09:50:05 -03:00
|
|
|
pass
|
2000-05-29 23:02:14 -03:00
|
|
|
|
2010-07-22 09:50:05 -03:00
|
|
|
class DistutilsArgError (DistutilsError):
|
2000-05-29 23:02:14 -03:00
|
|
|
"""Raised by fancy_getopt in response to getopt.error -- ie. an
|
|
|
|
error in the command line usage."""
|
2010-07-22 09:50:05 -03:00
|
|
|
pass
|
2000-05-29 23:02:14 -03:00
|
|
|
|
2010-07-22 09:50:05 -03:00
|
|
|
class DistutilsFileError (DistutilsError):
|
2000-05-29 23:02:14 -03:00
|
|
|
"""Any problems in the filesystem: expected file not found, etc.
|
2012-12-25 10:47:37 -04:00
|
|
|
Typically this is for problems that we detect before OSError
|
|
|
|
could be raised."""
|
2010-07-22 09:50:05 -03:00
|
|
|
pass
|
2000-05-29 23:02:14 -03:00
|
|
|
|
2010-07-22 09:50:05 -03:00
|
|
|
class DistutilsOptionError (DistutilsError):
|
2000-05-29 23:02:14 -03:00
|
|
|
"""Syntactic/semantic errors in command options, such as use of
|
|
|
|
mutually conflicting options, or inconsistent options,
|
|
|
|
badly-spelled values, etc. No distinction is made between option
|
|
|
|
values originating in the setup script, the command line, config
|
|
|
|
files, or what-have-you -- but if we *know* something originated in
|
|
|
|
the setup script, we'll raise DistutilsSetupError instead."""
|
2010-07-22 09:50:05 -03:00
|
|
|
pass
|
2000-05-29 23:02:14 -03:00
|
|
|
|
2010-07-22 09:50:05 -03:00
|
|
|
class DistutilsSetupError (DistutilsError):
|
2000-05-29 23:02:14 -03:00
|
|
|
"""For errors that can be definitely blamed on the setup script,
|
|
|
|
such as invalid keyword arguments to 'setup()'."""
|
2010-07-22 09:50:05 -03:00
|
|
|
pass
|
2000-05-29 23:02:14 -03:00
|
|
|
|
2010-07-22 09:50:05 -03:00
|
|
|
class DistutilsPlatformError (DistutilsError):
|
2000-05-29 23:02:14 -03:00
|
|
|
"""We don't know how to do something on the current platform (but
|
|
|
|
we do know how to do it on some platform) -- eg. trying to compile
|
|
|
|
C files on a platform not supported by a CCompiler subclass."""
|
2010-07-22 09:50:05 -03:00
|
|
|
pass
|
2000-05-29 23:02:14 -03:00
|
|
|
|
2010-07-22 09:50:05 -03:00
|
|
|
class DistutilsExecError (DistutilsError):
|
2000-05-29 23:02:14 -03:00
|
|
|
"""Any problems executing an external program (such as the C
|
|
|
|
compiler, when compiling C files)."""
|
2010-07-22 09:50:05 -03:00
|
|
|
pass
|
2000-05-29 23:02:14 -03:00
|
|
|
|
2010-07-22 09:50:05 -03:00
|
|
|
class DistutilsInternalError (DistutilsError):
|
2000-05-29 23:02:14 -03:00
|
|
|
"""Internal inconsistencies or impossibilities (obviously, this
|
|
|
|
should never be seen if the code is working!)."""
|
2010-07-22 09:50:05 -03:00
|
|
|
pass
|
2000-05-29 23:02:14 -03:00
|
|
|
|
2010-07-22 09:50:05 -03:00
|
|
|
class DistutilsTemplateError (DistutilsError):
|
2000-07-29 22:03:31 -03:00
|
|
|
"""Syntax error in a file list template."""
|
|
|
|
|
2009-10-25 20:08:47 -03:00
|
|
|
class DistutilsByteCompileError(DistutilsError):
|
|
|
|
"""Byte compile error."""
|
2000-05-29 23:02:14 -03:00
|
|
|
|
|
|
|
# Exception classes used by the CCompiler implementation classes
|
2010-07-22 09:50:05 -03:00
|
|
|
class CCompilerError (Exception):
|
2000-05-29 23:02:14 -03:00
|
|
|
"""Some compile/link operation failed."""
|
|
|
|
|
2010-07-22 09:50:05 -03:00
|
|
|
class PreprocessError (CCompilerError):
|
2000-06-24 23:12:14 -03:00
|
|
|
"""Failure to preprocess one or more C/C++ files."""
|
|
|
|
|
2010-07-22 09:50:05 -03:00
|
|
|
class CompileError (CCompilerError):
|
2000-05-29 23:02:14 -03:00
|
|
|
"""Failure to compile one or more C/C++ source files."""
|
|
|
|
|
2010-07-22 09:50:05 -03:00
|
|
|
class LibError (CCompilerError):
|
2000-05-29 23:02:14 -03:00
|
|
|
"""Failure to create a static library from one or more C/C++ object
|
|
|
|
files."""
|
|
|
|
|
2010-07-22 09:50:05 -03:00
|
|
|
class LinkError (CCompilerError):
|
2000-05-29 23:02:14 -03:00
|
|
|
"""Failure to link one or more C/C++ object files into an executable
|
|
|
|
or shared library file."""
|
|
|
|
|
2010-07-22 09:50:05 -03:00
|
|
|
class UnknownFileError (CCompilerError):
|
2000-06-24 23:12:14 -03:00
|
|
|
"""Attempt to process an unknown file type."""
|