openmedialibrary_platform/Darwin/lib/python3.5/distutils/errors.py

98 lines
3.5 KiB
Python
Raw Normal View History

2013-10-11 17:28:32 +00: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).
This module is safe to use in "from ... import *" mode; it only exports
symbols whose names start with "Distutils" and end with "Error"."""
2014-09-30 16:15:32 +00:00
class DistutilsError (Exception):
2013-10-11 17:28:32 +00:00
"""The root of all Distutils evil."""
2014-09-30 16:15:32 +00:00
pass
2013-10-11 17:28:32 +00:00
2014-09-30 16:15:32 +00:00
class DistutilsModuleError (DistutilsError):
2013-10-11 17:28:32 +00:00
"""Unable to load an expected module, or to find an expected class
within some module (in particular, command modules and classes)."""
2014-09-30 16:15:32 +00:00
pass
2013-10-11 17:28:32 +00:00
2014-09-30 16:15:32 +00:00
class DistutilsClassError (DistutilsError):
2013-10-11 17:28:32 +00: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."""
2014-09-30 16:15:32 +00:00
pass
2013-10-11 17:28:32 +00:00
2014-09-30 16:15:32 +00:00
class DistutilsGetoptError (DistutilsError):
2013-10-11 17:28:32 +00:00
"""The option table provided to 'fancy_getopt()' is bogus."""
2014-09-30 16:15:32 +00:00
pass
2013-10-11 17:28:32 +00:00
2014-09-30 16:15:32 +00:00
class DistutilsArgError (DistutilsError):
2013-10-11 17:28:32 +00:00
"""Raised by fancy_getopt in response to getopt.error -- ie. an
error in the command line usage."""
2014-09-30 16:15:32 +00:00
pass
2013-10-11 17:28:32 +00:00
2014-09-30 16:15:32 +00:00
class DistutilsFileError (DistutilsError):
2013-10-11 17:28:32 +00:00
"""Any problems in the filesystem: expected file not found, etc.
2014-09-30 16:15:32 +00:00
Typically this is for problems that we detect before OSError
could be raised."""
pass
2013-10-11 17:28:32 +00:00
2014-09-30 16:15:32 +00:00
class DistutilsOptionError (DistutilsError):
2013-10-11 17:28:32 +00: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."""
2014-09-30 16:15:32 +00:00
pass
2013-10-11 17:28:32 +00:00
2014-09-30 16:15:32 +00:00
class DistutilsSetupError (DistutilsError):
2013-10-11 17:28:32 +00:00
"""For errors that can be definitely blamed on the setup script,
such as invalid keyword arguments to 'setup()'."""
2014-09-30 16:15:32 +00:00
pass
2013-10-11 17:28:32 +00:00
2014-09-30 16:15:32 +00:00
class DistutilsPlatformError (DistutilsError):
2013-10-11 17:28:32 +00: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."""
2014-09-30 16:15:32 +00:00
pass
2013-10-11 17:28:32 +00:00
2014-09-30 16:15:32 +00:00
class DistutilsExecError (DistutilsError):
2013-10-11 17:28:32 +00:00
"""Any problems executing an external program (such as the C
compiler, when compiling C files)."""
2014-09-30 16:15:32 +00:00
pass
2013-10-11 17:28:32 +00:00
2014-09-30 16:15:32 +00:00
class DistutilsInternalError (DistutilsError):
2013-10-11 17:28:32 +00:00
"""Internal inconsistencies or impossibilities (obviously, this
should never be seen if the code is working!)."""
2014-09-30 16:15:32 +00:00
pass
2013-10-11 17:28:32 +00:00
2014-09-30 16:15:32 +00:00
class DistutilsTemplateError (DistutilsError):
2013-10-11 17:28:32 +00:00
"""Syntax error in a file list template."""
class DistutilsByteCompileError(DistutilsError):
"""Byte compile error."""
# Exception classes used by the CCompiler implementation classes
2014-09-30 16:15:32 +00:00
class CCompilerError (Exception):
2013-10-11 17:28:32 +00:00
"""Some compile/link operation failed."""
2014-09-30 16:15:32 +00:00
class PreprocessError (CCompilerError):
2013-10-11 17:28:32 +00:00
"""Failure to preprocess one or more C/C++ files."""
2014-09-30 16:15:32 +00:00
class CompileError (CCompilerError):
2013-10-11 17:28:32 +00:00
"""Failure to compile one or more C/C++ source files."""
2014-09-30 16:15:32 +00:00
class LibError (CCompilerError):
2013-10-11 17:28:32 +00:00
"""Failure to create a static library from one or more C/C++ object
files."""
2014-09-30 16:15:32 +00:00
class LinkError (CCompilerError):
2013-10-11 17:28:32 +00:00
"""Failure to link one or more C/C++ object files into an executable
or shared library file."""
2014-09-30 16:15:32 +00:00
class UnknownFileError (CCompilerError):
2013-10-11 17:28:32 +00:00
"""Attempt to process an unknown file type."""