Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

update: Add exception handling for write file operation.

Stitch-z5405d9cf32e7
diff --git a/metagpt/utils/file.py b/metagpt/utils/file.py
index 3e2adcf7b..84b2f8aeb 100644
--- a/metagpt/utils/file.py
+++ b/metagpt/utils/file.py
@@ -26,6 +26,9 @@ class File:
Returns:
The full filename of file, such as "/data/test.txt".
+
+ Raises:
+ Exception: If an unexpected error occurs during the file writing process.
"""
try:
root_path.mkdir(parents=True, exist_ok=True)