-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
7c23455
commit ccb9625
Showing
3 changed files
with
37 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,33 @@ | ||
class CategoryIntegral: | ||
"""Category can't be an integral.""" | ||
class CategoryIntegral(Exception): | ||
""" | ||
Category can't be an integral, only a string. | ||
You can check valid categories at: https://github.com/MarcoSa-2000/animegifs | ||
""" | ||
|
||
class CategoryError: | ||
"""Not a valid category. You can check valid categories at: https://github.com/MarcoSa-2000/animegifs""" | ||
def __init__(self, category, error="Category can't be an integral."): | ||
self.category = category | ||
self.error = error | ||
super().__init__(self.error) | ||
|
||
class CategoryError(Exception): | ||
""" | ||
Not a valid category. Category must be a string. | ||
You can check valid categories at: https://github.com/MarcoSa-2000/animegifs | ||
""" | ||
|
||
def __init__(self, category, error="Not a valid category."): | ||
self.category = category | ||
self.error = error | ||
super().__init__(self.error) | ||
|
||
class CategoryUnknown(Exception): | ||
""" | ||
This is a not handled error, probably the category type is neither an int nor a str. | ||
Make sure to check category is a string and is a valid category. | ||
You can check valid categories at: https://github.com/MarcoSa-2000/animegifs | ||
""" | ||
|
||
def __init__(self, category, error="Not a valid category."): | ||
self.category = category | ||
self.error = error | ||
super().__init__(self.error) |
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