From 57707c708b01a481bd2f445ad4f6d6d2bfd6a9b3 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Thu, 30 Mar 2023 23:08:02 +0300 Subject: [PATCH] add exception logging --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 2ad45c8..0c0bddb 100644 --- a/main.py +++ b/main.py @@ -135,7 +135,10 @@ async def update(msg: Message): async def background_on_start(): while True: logging.warning('Checking updates...') - await check_updates() + try: + await check_updates() + except Exception as e: + logging.exception(e) logging.warning('Sleeping...') await asyncio.sleep(60)