mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 03:32:33 +08:00
34 lines
751 B
Python
34 lines
751 B
Python
|
|
|
|
class CommandError(Exception):
|
|
|
|
def __init__(self, message: str = None):
|
|
self.message = message
|
|
|
|
def __str__(self):
|
|
return self.message
|
|
|
|
|
|
class CommandNotFoundError(CommandError):
|
|
|
|
def __init__(self, message: str = None):
|
|
super().__init__("未知命令: "+message)
|
|
|
|
|
|
class CommandPrivilegeError(CommandError):
|
|
|
|
def __init__(self, message: str = None):
|
|
super().__init__("权限不足: "+message)
|
|
|
|
|
|
class ParamNotEnoughError(CommandError):
|
|
|
|
def __init__(self, message: str = None):
|
|
super().__init__("参数不足: "+message)
|
|
|
|
|
|
class CommandOperationError(CommandError):
|
|
|
|
def __init__(self, message: str = None):
|
|
super().__init__("操作失败: "+message)
|