52 lines
1.1 KiB
Python
52 lines
1.1 KiB
Python
class UserNotFoundError(Exception):
|
|
def __init__(self):
|
|
super().__init__('user not found')
|
|
|
|
|
|
class GroupNotFoundError(Exception):
|
|
def __init__(self):
|
|
super().__init__('group not found')
|
|
|
|
|
|
class BadRequest(Exception):
|
|
pass
|
|
|
|
|
|
class KerberosError(Exception):
|
|
pass
|
|
|
|
|
|
class UserAlreadyExistsError(Exception):
|
|
def __init__(self):
|
|
super().__init__('user already exists')
|
|
|
|
|
|
class GroupAlreadyExistsError(Exception):
|
|
def __init__(self):
|
|
super().__init__('group already exists')
|
|
|
|
|
|
class UserAlreadyInGroupError(Exception):
|
|
def __init__(self):
|
|
super().__init__('user is already in group')
|
|
|
|
|
|
class UserNotInGroupError(Exception):
|
|
def __init__(self):
|
|
super().__init__('user is not in group')
|
|
|
|
|
|
class UserAlreadySubscribedError(Exception):
|
|
def __init__(self):
|
|
super().__init__('user is already subscribed')
|
|
|
|
|
|
class UserNotSubscribedError(Exception):
|
|
def __init__(self):
|
|
super().__init__('user is not subscribed')
|
|
|
|
|
|
class NoSuchListError(Exception):
|
|
def __init__(self):
|
|
super().__init__('mailing list does not exist')
|