Skip to content

Commit 3b3546c

Browse files
authored
Fix exception cause in agent_builder.py
1 parent 083f522 commit 3b3546c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autogen/agentchat/contrib/agent_builder.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def load(
402402
try:
403403
print(f"Loding config from {filepath}")
404404
cached_configs = json.load(open(filepath))
405-
except FileNotFoundError:
406-
raise FileNotFoundError(f"Config file {filepath} does not exist.")
405+
except FileNotFoundError as e:
406+
raise FileNotFoundError(f"Config file {filepath} does not exist.") from e
407407

408408
return self.build(cached_configs=cached_configs, **kwargs)

0 commit comments

Comments
 (0)