MemoryManager.load_memory: Raise exception on error

This commit is contained in:
Dominik Jain authored and Dominik Jain committed 2026-06-16 12:52:33 +02:00
1 parent b25c21952a
commit d6844aabe5
1 file changed
+1 -1
+1 -1
View File
@@ -191,7 +191,7 @@ class MemoryManager:
self._check_not_ignored(name)
memory_file_path = self.get_memory_file_path(name)
if not memory_file_path.exists():
return f"Memory file {name} not found, consider creating it with the `write_memory` tool if you need it."
raise FileNotFoundError(f"Memory named '{name}' not found")
with open(memory_file_path, encoding=self._encoding) as f:
return f.read()