PageRenderTime 45ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/lib-python/modified-2.7/distutils/errors.py

https://bitbucket.org/dac_io/pypy
Python | 88 lines | 83 code | 1 blank | 4 comment | 3 complexity | 8474e57e9d8ce0f8d83bf82164c63479 MD5 | raw file
  1. """distutils.errors
  2. Provides exceptions used by the Distutils modules. Note that Distutils
  3. modules may raise standard exceptions; in particular, SystemExit is
  4. usually raised for errors that are obviously the end-user's fault
  5. (eg. bad command-line arguments).
  6. This module is safe to use in "from ... import *" mode; it only exports
  7. symbols whose names start with "Distutils" and end with "Error"."""
  8. __revision__ = "$Id$"
  9. class DistutilsError(Exception):
  10. """The root of all Distutils evil."""
  11. class DistutilsModuleError(DistutilsError):
  12. """Unable to load an expected module, or to find an expected class
  13. within some module (in particular, command modules and classes)."""
  14. class DistutilsClassError(DistutilsError):
  15. """Some command class (or possibly distribution class, if anyone
  16. feels a need to subclass Distribution) is found not to be holding
  17. up its end of the bargain, ie. implementing some part of the
  18. "command "interface."""
  19. class DistutilsGetoptError(DistutilsError):
  20. """The option table provided to 'fancy_getopt()' is bogus."""
  21. class DistutilsArgError(DistutilsError):
  22. """Raised by fancy_getopt in response to getopt.error -- ie. an
  23. error in the command line usage."""
  24. class DistutilsFileError(DistutilsError):
  25. """Any problems in the filesystem: expected file not found, etc.
  26. Typically this is for problems that we detect before IOError or
  27. OSError could be raised."""
  28. class DistutilsOptionError(DistutilsError):
  29. """Syntactic/semantic errors in command options, such as use of
  30. mutually conflicting options, or inconsistent options,
  31. badly-spelled values, etc. No distinction is made between option
  32. values originating in the setup script, the command line, config
  33. files, or what-have-you -- but if we *know* something originated in
  34. the setup script, we'll raise DistutilsSetupError instead."""
  35. class DistutilsSetupError(DistutilsError):
  36. """For errors that can be definitely blamed on the setup script,
  37. such as invalid keyword arguments to 'setup()'."""
  38. class DistutilsPlatformError(DistutilsError):
  39. """We don't know how to do something on the current platform (but
  40. we do know how to do it on some platform) -- eg. trying to compile
  41. C files on a platform not supported by a CCompiler subclass."""
  42. class DistutilsExecError(DistutilsError):
  43. """Any problems executing an external program (such as the C
  44. compiler, when compiling C files)."""
  45. class DistutilsInternalError(DistutilsError):
  46. """Internal inconsistencies or impossibilities (obviously, this
  47. should never be seen if the code is working!)."""
  48. class DistutilsTemplateError(DistutilsError):
  49. """Syntax error in a file list template."""
  50. class DistutilsByteCompileError(DistutilsError):
  51. """Byte compile error."""
  52. # Exception classes used by the CCompiler implementation classes
  53. class CCompilerError(Exception):
  54. """Some compile/link operation failed."""
  55. class PreprocessError(CCompilerError):
  56. """Failure to preprocess one or more C/C++ files."""
  57. class CompileError(CCompilerError):
  58. """Failure to compile one or more C/C++ source files."""
  59. class LibError(CCompilerError):
  60. """Failure to create a static library from one or more C/C++ object
  61. files."""
  62. class LinkError(CCompilerError):
  63. """Failure to link one or more C/C++ object files into an executable
  64. or shared library file."""
  65. class UnknownFileError(CCompilerError):
  66. """Attempt to process an unknown file type."""