Have the same error message for file not found

This commit is contained in:
Andras Schmelczer 2025-11-22 20:19:13 +00:00
commit 31d4343fb1

View file

@ -117,7 +117,8 @@ export class SafeFileSystemOperations implements FileSystemOperations {
): Promise<T> {
if (!(await this.fs.exists(path))) {
throw new FileNotFoundError(
`File '${path}' not found before trying to ${operationName}`
`File not found before trying to ${operationName}`,
path
);
}
@ -131,7 +132,8 @@ export class SafeFileSystemOperations implements FileSystemOperations {
throw error;
} else {
throw new FileNotFoundError(
`File '${path}' not found when trying to ${operationName}`
`File not found when trying to ${operationName}`,
path
);
}
}