-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
75 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
""" | ||
When `vcs-repo-mgr` encounters known errors it will raise an exception. Most of | ||
these exceptions have special types that capture the type of error so that the | ||
Python :py:keyword:`except` statement can be used to handle different types of | ||
errors in different ways. | ||
""" | ||
|
||
class VcsRepoMgrError(Exception): | ||
""" | ||
Base class for exceptions directly raised by :py:mod:`vcs_repo_mgr`. | ||
""" | ||
|
||
class AmbiguousRepositoryNameError(VcsRepoMgrError): | ||
""" | ||
Exception raised by :py:func:`~vcs_repo_mgr.find_configured_repository()` | ||
when the given repository name is ambiguous (i.e. it matches multiple | ||
repository names). | ||
""" | ||
|
||
class NoMatchingReleasesError(VcsRepoMgrError): | ||
""" | ||
Exception raised by :py:func:`~vcs_repo_mgr.Repository.select_release()` | ||
when no matching releases are found in the repository. | ||
""" | ||
|
||
class NoSuchRepositoryError(VcsRepoMgrError): | ||
""" | ||
Exception raised by :py:func:`~vcs_repo_mgr.find_configured_repository()` | ||
when the given repository name doesn't match any of the configured | ||
repositories. | ||
""" | ||
|
||
class UnknownRepositoryTypeError(VcsRepoMgrError): | ||
""" | ||
Exception raised by :py:func:`~vcs_repo_mgr.find_configured_repository()` | ||
when it encounters a repository definition with an unknown type. | ||
""" |