diff --git a/explain/agents.py b/explain/agents.py index 37e4028..513f1d6 100644 --- a/explain/agents.py +++ b/explain/agents.py @@ -49,7 +49,7 @@ def find_binary(cls) -> Path | None: Path to the agent binary, or None if not found Raises: - FileNotFoundError: If the EXPLAIN_{AGENT}_PATH environment variable is set but the path + Exception: If the EXPLAIN_{AGENT}_PATH environment variable is set but the path could not be found """ env_var = f"EXPLAIN_{cls.name.upper()}_PATH" @@ -57,7 +57,7 @@ def find_binary(cls) -> Path | None: if loc := shutil.which(program): return Path(loc).absolute() if os.environ.get(env_var): - raise FileNotFoundError(f"{env_var} is set to {program!r} but it could not be found.") + raise Exception(f"{env_var} is set to {program!r} but it could not be found.") return None @abstractmethod