diff --git a/rose/main.py b/rose/main.py index 5e2fe86..72aaff1 100644 --- a/rose/main.py +++ b/rose/main.py @@ -16,10 +16,15 @@ def load_driver_module(driver_path): Raises: Exception if the module cannot be loaded """ - spec = importlib.util.spec_from_file_location("driver_module", driver_path) - driver_module = importlib.util.module_from_spec(spec) - spec.loader.exec_module(driver_module) - return driver_module + try: + spec = importlib.util.spec_from_file_location("driver_module", driver_path) + driver_module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(driver_module) + return driver_module + except Exception as e: + raise ImportError( + f"Error loading driver module from path {driver_path}: {str(e)}" + ) def main():