fix(alas): 添加了遗漏的捕获异常并发送通知

- 在loop中添加异常捕获块,确保脚本在发生异常时能够发送通知(原先模拟器游戏死机的情况报错没得到推送)
This commit is contained in:
POLAR me 2024-12-30 02:55:11 +08:00
parent 1531be5ded
commit cea810e379

View File

@ -633,6 +633,15 @@ class AzurLaneAutoScript:
content=f"<{self.config_name}> RequestHumanTakeover",
)
exit(1)
except Exception as e:
logger.exception(e)
self.save_error_log()
handle_notify(
self.config.Error_OnePushConfig,
title=f"Alas <{self.config_name}> crashed",
content=f"<{self.config_name}> Exception occured",
)
exit(1)
self.config.task_delay(server_update=True)
del_cached_property(self, 'config')
continue