mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 02:16:21 +00:00
MemoryManager.load_memory: Raise exception on error
This commit is contained in:
1 parent
b25c21952a
commit
d6844aabe5
1 file changed
+1
-1
@@ -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()
|
||||
|
||||
|
||||
Reference in new issue
Block a user