| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- class nick_in_use(Exception):
- def __init__(self, nick: str) -> None:
- super().__init__("Nick \"" + nick + "\" already in use.")
- class user_is_only_admin(Exception):
- def __init__(self) -> None:
- super().__init__("This user is only admin, can not being removed.")
- class invalid_nick_syntax(Exception):
- def __init__(self, nick: str, error: Exception) -> None:
- comment = "Nick \"" + nick + "\" has invalid syntax."
- comment = comment + "\nError: " + str(error)
- super().__init__(comment)
- class user_is_not_admin(Exception):
- def __init__(self):
- super().__init__("To do that action user must be admin.")
- class invalid_password_syntax(Exception):
- def __init__(self, password: str, error: Exception) -> None:
- comment = "Password \"" + password + "\" has invalid syntax."
- comment = comment + "\nError: " + str(error)
- super().__init__(comment)
- class invalid_apikey_syntax(Exception):
- def __init__(self, apikey: str, error: Exception) -> None:
- comment = "Api Key \"" + apikey + "\" has invalid syntax."
- comment = comment + "\nError: " + str(error)
- super().__init__(comment)
- class nick_not_exists(Exception):
- def __init__(self, nick: str) -> None:
- super().__init__("User with nick \"" + nick + "\" not exists.")
- class apikey_not_exists(Exception):
- def __init__(self, apikey: str) -> None:
- super().__init__("Api Key \"" + apikey + "\" does not exists.")
|