mirror of
https://github.com/W1NDes/M-AzurLaneAutoScript.git
synced 2026-05-14 04:08:09 +08:00
fix(alas): 添加了遗漏的捕获异常并发送通知
- 在loop中添加异常捕获块,确保脚本在发生异常时能够发送通知(原先模拟器游戏死机的情况报错没得到推送)
This commit is contained in:
parent
1531be5ded
commit
cea810e379
9
alas.py
9
alas.py
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user