Proper error output

This commit is contained in:
Kovid Goyal
2024-11-07 09:35:26 +05:30
parent 6ad9f6fd40
commit 27cf969a64

View File

@@ -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')