exceptions.py 1.1 KB

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