File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
nonebot_plugin_maimaimonitor Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,9 @@ async def handle_net(matcher: Matcher):
6767 try :
6868 await matcher .send (MessageSegment .image (cache_file .read_bytes ()))
6969 await matcher .finish ()
70- except Exception :
70+ except Exception as e :
71+ if "FinishedException" in type (e ).__name__ :
72+ raise e
7173 cache_file .unlink (missing_ok = True )
7274
7375 try :
@@ -92,7 +94,7 @@ async def handle_net(matcher: Matcher):
9294 else :
9395 await matcher .finish (f"获取状态图失败 (HTTP { response .status_code } )\n URL: { OG_API_URL } \n 请检查网络连接或 API 状态。" )
9496 except Exception as e :
95- if isinstance ( e , Matcher . finish ) or "FinishedException" in type (e ).__name__ :
97+ if "FinishedException" in type (e ).__name__ :
9698 raise e
9799
98100 error_type = type (e ).__name__
You can’t perform that action at this time.
0 commit comments