mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-12 00:36:03 +00:00
refactor: 重构插件系统
This commit is contained in:
24
pkg/plugin/errors.py
Normal file
24
pkg/plugin/errors.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
class PluginSystemError(Exception):
|
||||
|
||||
message: str
|
||||
|
||||
def __init__(self, message: str):
|
||||
self.message = message
|
||||
|
||||
def __str__(self):
|
||||
return self.message
|
||||
|
||||
|
||||
class PluginNotFoundError(PluginSystemError):
|
||||
|
||||
def __init__(self, message: str):
|
||||
super().__init__(f"未找到插件: {message}")
|
||||
|
||||
|
||||
class PluginInstallerError(PluginSystemError):
|
||||
|
||||
def __init__(self, message: str):
|
||||
super().__init__(f"安装器操作错误: {message}")
|
||||
Reference in New Issue
Block a user