exceptions.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. """Exceptions used throughout package"""
  2. class PipError(Exception):
  3. """Base pip exception"""
  4. class InstallationError(PipError):
  5. """General exception during installation"""
  6. class UninstallationError(PipError):
  7. """General exception during uninstallation"""
  8. class DistributionNotFound(InstallationError):
  9. """Raised when a distribution cannot be found to satisfy a requirement"""
  10. class BestVersionAlreadyInstalled(PipError):
  11. """Raised when the most up-to-date version of a package is already
  12. installed. """
  13. class BadCommand(PipError):
  14. """Raised when virtualenv or a command is not found"""
  15. class CommandError(PipError):
  16. """Raised when there is an error in command-line arguments"""
  17. class PreviousBuildDirError(PipError):
  18. """Raised when there's a previous conflicting build directory"""
  19. class HashMismatch(InstallationError):
  20. """Distribution file hash values don't match."""
  21. class InvalidWheelFilename(InstallationError):
  22. """Invalid wheel filename."""
  23. class UnsupportedWheel(InstallationError):
  24. """Unsupported wheel."""