-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathError.py
More file actions
24 lines (20 loc) · 1.12 KB
/
Error.py
File metadata and controls
24 lines (20 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#GroupError raised when invalid group/group not created
class GroupError(Exception):
def __init__(self, msg='Group not found. Use /start first', *args, **kwargs):
super().__init__(msg, *args, **kwargs)
#UserError raised when invalid user/user not created
class UserError(Exception):
def __init__(self, msg='User not found', *args, **kwargs):
super().__init__(msg, *args, **kwargs)
#InvalidLinkError raised when the link sent is not a valid NUSMods timetable link
class InvalidLinkError(Exception):
def __init__(self, msg='Invalid link', *args, **kwargs):
super().__init__(msg, *args, **kwargs)
#InvalidActionError raised when user has not entered /edit before editing timetable link
class InvalidActionError(Exception):
def __init__(self, msg='Invalid Action! Use /edit first to edit your NUSMods timetable link', *args, **kwargs):
super().__init__(msg, *args, **kwargs)
#InvalidModError when mod provided is invalid
class InvalidModError(Exception):
def __init__(self, msg = "Could not find data! Please check your link again!", *args, **kwargs):
super().__init__(msg, *args, **kwargs)