1
Fork 0
mirror of https://github.com/RGBCube/GitHubWrapper synced 2025-05-18 15:05:08 +00:00

exceptions

This commit is contained in:
VarMonke 2022-04-04 21:55:08 +05:30
parent 36c9c6eb6d
commit 2a2656c5dd
2 changed files with 15 additions and 6 deletions

View file

@ -87,4 +87,10 @@ class NotStarted(APIError):
"""Raised when a call is made before start is called."""
def __init__(self):
msg = 'You must call `await <Github_instance>.start()` before making this call.'
super().__init__(msg)
class RepositoryAlreadyExists(APIError):
"""Raised when a repository already exists."""
def __init__(self):
msg = 'The repository you are trying to create already exists.'
super().__init__(msg)