Path: blob/main/test/lib/python3.9/site-packages/setuptools/_distutils/errors.py
4799 views
"""distutils.errors12Provides exceptions used by the Distutils modules. Note that Distutils3modules may raise standard exceptions; in particular, SystemExit is4usually raised for errors that are obviously the end-user's fault5(eg. bad command-line arguments).67This module is safe to use in "from ... import *" mode; it only exports8symbols whose names start with "Distutils" and end with "Error"."""910class DistutilsError (Exception):11"""The root of all Distutils evil."""12pass1314class DistutilsModuleError (DistutilsError):15"""Unable to load an expected module, or to find an expected class16within some module (in particular, command modules and classes)."""17pass1819class DistutilsClassError (DistutilsError):20"""Some command class (or possibly distribution class, if anyone21feels a need to subclass Distribution) is found not to be holding22up its end of the bargain, ie. implementing some part of the23"command "interface."""24pass2526class DistutilsGetoptError (DistutilsError):27"""The option table provided to 'fancy_getopt()' is bogus."""28pass2930class DistutilsArgError (DistutilsError):31"""Raised by fancy_getopt in response to getopt.error -- ie. an32error in the command line usage."""33pass3435class DistutilsFileError (DistutilsError):36"""Any problems in the filesystem: expected file not found, etc.37Typically this is for problems that we detect before OSError38could be raised."""39pass4041class DistutilsOptionError (DistutilsError):42"""Syntactic/semantic errors in command options, such as use of43mutually conflicting options, or inconsistent options,44badly-spelled values, etc. No distinction is made between option45values originating in the setup script, the command line, config46files, or what-have-you -- but if we *know* something originated in47the setup script, we'll raise DistutilsSetupError instead."""48pass4950class DistutilsSetupError (DistutilsError):51"""For errors that can be definitely blamed on the setup script,52such as invalid keyword arguments to 'setup()'."""53pass5455class DistutilsPlatformError (DistutilsError):56"""We don't know how to do something on the current platform (but57we do know how to do it on some platform) -- eg. trying to compile58C files on a platform not supported by a CCompiler subclass."""59pass6061class DistutilsExecError (DistutilsError):62"""Any problems executing an external program (such as the C63compiler, when compiling C files)."""64pass6566class DistutilsInternalError (DistutilsError):67"""Internal inconsistencies or impossibilities (obviously, this68should never be seen if the code is working!)."""69pass7071class DistutilsTemplateError (DistutilsError):72"""Syntax error in a file list template."""7374class DistutilsByteCompileError(DistutilsError):75"""Byte compile error."""7677# Exception classes used by the CCompiler implementation classes78class CCompilerError (Exception):79"""Some compile/link operation failed."""8081class PreprocessError (CCompilerError):82"""Failure to preprocess one or more C/C++ files."""8384class CompileError (CCompilerError):85"""Failure to compile one or more C/C++ source files."""8687class LibError (CCompilerError):88"""Failure to create a static library from one or more C/C++ object89files."""9091class LinkError (CCompilerError):92"""Failure to link one or more C/C++ object files into an executable93or shared library file."""9495class UnknownFileError (CCompilerError):96"""Attempt to process an unknown file type."""979899