update: Add exception handling for write file operation.

This commit is contained in:
Stitch-z 2023-09-07 20:09:04 +08:00
parent b2b227391a
commit 5405d9cf32

View file

@ -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)