mirror of
https://github.com/microsoft/autogen.git
synced 2026-04-20 03:02:16 -04:00
Fix exception causes all over the codebase (#1014)
This commit is contained in:
@@ -128,7 +128,7 @@ def serialize_file(file_path: str) -> Tuple[str, str]:
|
||||
file_content = file.read()
|
||||
base64_encoded_content = base64.b64encode(file_content).decode("utf-8")
|
||||
except Exception as e:
|
||||
raise IOError(f"An error occurred while reading the file: {e}")
|
||||
raise IOError(f"An error occurred while reading the file: {e}") from e
|
||||
|
||||
return base64_encoded_content, file_type
|
||||
|
||||
|
||||
Reference in New Issue
Block a user