From 27cf969a64f7846eb1c7e955959d3d3b37b9e2d9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 7 Nov 2024 09:35:26 +0530 Subject: [PATCH] Proper error output --- kitty/launch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kitty/launch.py b/kitty/launch.py index 2f8e728bf..123ae3093 100644 --- a/kitty/launch.py +++ b/kitty/launch.py @@ -441,9 +441,10 @@ def load_watch_modules(watchers: Iterable[str]) -> Optional[Watchers]: if callable(w): try: w(boss, {}) - except Exception: + except Exception as err: import traceback - traceback.print_exc() + log_error(traceback.format_exc()) + log_error(f'Failed to call on_load() in watcher from {path} with error: {err}') if m is False: continue w = m.get('on_close')