2009-11-20 09:47:28 +01:00
|
|
|
"""Exceptions used throughout package"""
|
|
|
|
|
2010-06-03 04:25:26 +02:00
|
|
|
|
2012-03-02 00:51:13 +01:00
|
|
|
class PipError(Exception):
|
|
|
|
"""Base pip exception"""
|
|
|
|
|
|
|
|
|
|
|
|
class InstallationError(PipError):
|
2009-11-20 09:47:28 +01:00
|
|
|
"""General exception during installation"""
|
|
|
|
|
2010-06-03 04:25:26 +02:00
|
|
|
|
2012-03-02 00:51:13 +01:00
|
|
|
class UninstallationError(PipError):
|
2009-11-20 09:47:28 +01:00
|
|
|
"""General exception during uninstallation"""
|
|
|
|
|
2010-06-03 04:25:26 +02:00
|
|
|
|
2009-11-20 09:47:28 +01:00
|
|
|
class DistributionNotFound(InstallationError):
|
|
|
|
"""Raised when a distribution cannot be found to satisfy a requirement"""
|
|
|
|
|
2010-06-03 04:25:26 +02:00
|
|
|
|
2012-03-02 00:51:13 +01:00
|
|
|
class BestVersionAlreadyInstalled(PipError):
|
2011-08-24 20:07:16 +02:00
|
|
|
"""Raised when the most up-to-date version of a package is already
|
2012-03-02 00:51:13 +01:00
|
|
|
installed. """
|
2011-08-24 20:07:16 +02:00
|
|
|
|
2012-01-30 07:26:12 +01:00
|
|
|
|
2012-03-02 00:51:13 +01:00
|
|
|
class BadCommand(PipError):
|
2009-11-20 09:47:28 +01:00
|
|
|
"""Raised when virtualenv or a command is not found"""
|
2011-07-20 21:04:11 +02:00
|
|
|
|
2011-08-04 17:09:38 +02:00
|
|
|
|
2012-03-02 00:51:13 +01:00
|
|
|
class CommandError(PipError):
|
2011-07-20 21:04:11 +02:00
|
|
|
"""Raised when there is an error in command-line arguments"""
|
2013-03-27 06:26:52 +01:00
|
|
|
|
|
|
|
|
|
|
|
class PreviousBuildDirError(PipError):
|
|
|
|
"""Raised when there's a previous conflicting build directory"""
|
|
|
|
|
2013-05-30 23:03:04 +02:00
|
|
|
|
|
|
|
class HashMismatch(InstallationError):
|
|
|
|
"""Distribution file hash values don't match."""
|