mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-26 17:26:22 +02:00
update: Add exception handling for write file operation.
This commit is contained in:
parent
b2b227391a
commit
5405d9cf32
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue