From 4df80509dc6ead5ef3bfe067bbc1da74e63fc7bb Mon Sep 17 00:00:00 2001 From: Rongrong Date: Fri, 3 Nov 2023 23:45:10 +0800 Subject: [PATCH] fix: uncaught error not logged Signed-off-by: Rongrong --- src/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/__init__.py b/src/__init__.py index c4910c236f..f0f1ed7ae4 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -314,6 +314,9 @@ def main(): except (KeyboardInterrupt, SystemExit) as e: logger.error(f'Received {type(e).__name__}, exiting...', exc_info=e) exit_code = e.code if isinstance(e, SystemExit) and e.code is not None else 0 + except Exception as e: + logger.critical('Uncaught error:', exc_info=e) + exit_code = 99 finally: try: if getattr(signal, 'SIGALRM', None):