mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-06 07:56:52 +08:00
refactor: own shutdown lifecycle boundaries
This commit is contained in:
@@ -4,6 +4,7 @@ __all__ = (
|
||||
"APIRateLimitException",
|
||||
"RateLimitExceededException",
|
||||
"OperationInterrupted",
|
||||
"PluginMutationRejectedError",
|
||||
"StorageQueryError",
|
||||
"TMDbException",
|
||||
)
|
||||
@@ -49,6 +50,15 @@ class OperationInterrupted(KeyboardInterrupt):
|
||||
pass
|
||||
|
||||
|
||||
class PluginMutationRejectedError(RuntimeError):
|
||||
"""表示插件运行时已封口,新的可变事务未获准执行。"""
|
||||
|
||||
def __init__(self, operation: str) -> None:
|
||||
"""保存被拒绝的操作名称并生成稳定诊断消息。"""
|
||||
self.operation = operation
|
||||
super().__init__(f"插件运行时已进入停机阶段,拒绝{operation}")
|
||||
|
||||
|
||||
class StorageQueryError(Exception):
|
||||
"""
|
||||
用于表示存储查询无法确认结果的异常类。
|
||||
|
||||
Reference in New Issue
Block a user