mirror of
https://github.com/TriM-Organization/LiteyukiBot-TriM.git
synced 2024-11-11 01:27:29 +08:00
feat: 忽略键盘中断类错误
This commit is contained in:
parent
e78a3cdab6
commit
f15bd985af
6
main.py
6
main.py
@ -19,5 +19,7 @@ if __name__ == "__main__":
|
||||
try:
|
||||
nonebot.run()
|
||||
except BaseException as e:
|
||||
nonebot.logger.error(f"An error occurred: {e}, Bug will be reported automatically.")
|
||||
liteyuki_api.bug_report(str(e.__repr__()))
|
||||
# 排除键盘中断
|
||||
if not isinstance(e, KeyboardInterrupt):
|
||||
nonebot.logger.error(f"An error occurred: {e}, Bug will be reported automatically.")
|
||||
liteyuki_api.bug_report(str(e.__repr__()))
|
||||
|
Loading…
Reference in New Issue
Block a user