mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-27 02:25:08 +00:00
233e7ab58d
Co-authored-by: luoshuijs <luoshuijs@outlook.com> Co-authored-by: Karako <karakohear@gmail.com> Co-authored-by: xtaodada <xtao@xtaolink.cn>
20 lines
522 B
Python
20 lines
522 B
Python
"""此模块包含BOT Utils的错误的基类"""
|
|
|
|
|
|
class NotFoundError(Exception):
|
|
entity_name: str
|
|
entity_value_name: str = "value"
|
|
|
|
def __init__(self, entity_value):
|
|
super().__init__(f"{self.entity_name} not found, {self.entity_value_name}: {entity_value}")
|
|
|
|
|
|
class RegionNotFoundError(NotFoundError):
|
|
entity_name: str = "RegionEnum"
|
|
entity_value_name: str = "region"
|
|
|
|
|
|
class UrlResourcesNotFoundError(NotFoundError):
|
|
entity_name: str = "url resources"
|
|
entity_value_name: str = "url"
|