From 70446be108e804c4d6916247d633b375f8be0431 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Wed, 23 Apr 2025 00:08:03 +0800 Subject: [PATCH] perf: catching a more specific exception type instead Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- packages/astrbot/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astrbot/main.py b/packages/astrbot/main.py index 6a423925f..7569e742e 100644 --- a/packages/astrbot/main.py +++ b/packages/astrbot/main.py @@ -805,7 +805,7 @@ UID: {user_id} 此 ID 可用于设置管理员。 if self.ltm: try: await self.ltm.remove_session(event=message) - except BaseException as e: + except Exception as e: logger.error(f"清理聊天增强记录失败: {e}") message.set_result(