Put the path back into file not found exception.

Its absence causes a dartdoc test failure.

Bug: https://github.com/dart-lang/sdk/issues/47220
Bug: https://buganizer.corp.google.com/issues/200468974
Change-Id: I0fe8af902cd9a11abb0102ce4744c57f1738ab5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
Konstantin Shcheglov 2021-09-20 18:39:27 +00:00 committed by commit-bot@chromium.org
parent f1824fb1e7
commit 45bfa70348

View file

@ -480,7 +480,9 @@ class _MemoryFile extends _MemoryResource implements File {
var canonicalPath = provider._resolveLinks(path);
var data = provider._pathToData[canonicalPath];
if (data is! _FileData) {
throw FileSystemException(path, 'File does not exist.');
// TODO(scheglov) Remove the path from the message.
// When https://github.com/dart-lang/dartdoc/pull/2796 is in google3.
throw FileSystemException(path, 'File "$path" does not exist.');
}
return data.bytes;
}