2021-04-13 11:03:44 +02:00
|
|
|
import logging
|
|
|
|
|
2021-04-09 10:17:38 +02:00
|
|
|
from izihawa_utils.exceptions import BaseError
|
|
|
|
|
|
|
|
|
2021-04-13 11:03:44 +02:00
|
|
|
class BannedUserError(BaseError):
|
|
|
|
level = logging.WARNING
|
|
|
|
code = 'banned_user_error'
|
|
|
|
|
|
|
|
def __init__(self, ban_timeout: int):
|
|
|
|
self.ban_timeout = ban_timeout
|
|
|
|
|
|
|
|
|
2021-04-09 10:17:38 +02:00
|
|
|
class UnknownFileFormatError(BaseError):
|
2021-04-15 16:14:54 +02:00
|
|
|
level = logging.WARNING
|
2021-04-09 10:17:38 +02:00
|
|
|
code = 'unknown_file_format_error'
|
|
|
|
|
|
|
|
|
2022-03-28 16:39:36 +02:00
|
|
|
class UnknownIndexAliasError(BaseError):
|
|
|
|
code = 'unknown_index_alias_error'
|
2022-09-02 17:44:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
class WidgetError(BaseError):
|
|
|
|
level = logging.WARNING
|
|
|
|
code = 'widget_error'
|
|
|
|
|
|
|
|
def __init__(self, text, buttons):
|
|
|
|
self.text = text
|
|
|
|
self.buttons = buttons
|