diff --git a/queries/__init__.py b/queries/__init__.py index 7e182966..1d72541c 100755 --- a/queries/__init__.py +++ b/queries/__init__.py @@ -456,7 +456,9 @@ def init_class(cls) -> None: if is_proc: all_procs.append(m) except ImportError as e: - logging.error(f"Error importing query processor module {modname}: {e}") + logging.error(f"Error importing query processor module {modname}: {repr(e)}") + except Exception as e: + logging.error(f"Error initializing query processor module {modname}: {repr(e)}") # Sort the processors by descending priority # so that the higher-priority ones get invoked bfore the lower-priority ones @@ -518,7 +520,9 @@ def init_class(cls) -> None: ) ) except ImportError as e: - logging.error(f"Error importing utility module {modname}: {e}") + logging.error(f"Error importing utility module {modname}: {repr(e)}") + except Exception as e: + logging.error(f"Error initializing utility module {modname}: {repr(e)}") for processor in cls._tree_processors: # Check whether this tree processor supplies a query grammar fragment