| Index: pkg/analyzer/lib/file_system/memory_file_system.dart
|
| diff --git a/pkg/analyzer/lib/file_system/memory_file_system.dart b/pkg/analyzer/lib/file_system/memory_file_system.dart
|
| index e5def6a28da74985aaef2e78314388300bf2a4b3..4a365ee733633a213f2694bd17586ab5a10cfae2 100644
|
| --- a/pkg/analyzer/lib/file_system/memory_file_system.dart
|
| +++ b/pkg/analyzer/lib/file_system/memory_file_system.dart
|
| @@ -206,6 +206,11 @@ class _MemoryDummyLink extends _MemoryResource implements File {
|
| bool isOrContains(String path) {
|
| return path == this.path;
|
| }
|
| +
|
| + @override
|
| + String readAsStringSync() {
|
| + throw new FileSystemException(path, 'File could not be read');
|
| + }
|
| }
|
|
|
| /**
|
| @@ -221,7 +226,7 @@ class _MemoryFile extends _MemoryResource implements File {
|
| int get modificationStamp {
|
| int stamp = _provider._pathToTimestamp[path];
|
| if (stamp == null) {
|
| - throw new FileSystemException(path, 'File does not exist.');
|
| + throw new FileSystemException(path, 'File "$path" does not exist.');
|
| }
|
| return stamp;
|
| }
|
| @@ -229,7 +234,7 @@ class _MemoryFile extends _MemoryResource implements File {
|
| String get _content {
|
| String content = _provider._pathToContent[path];
|
| if (content == null) {
|
| - throw new FileSystemException(path, "File does not exist");
|
| + throw new FileSystemException(path, 'File "$path" does not exist.');
|
| }
|
| return content;
|
| }
|
| @@ -246,6 +251,15 @@ class _MemoryFile extends _MemoryResource implements File {
|
| bool isOrContains(String path) {
|
| return path == this.path;
|
| }
|
| +
|
| + @override
|
| + String readAsStringSync() {
|
| + String content = _provider._pathToContent[path];
|
| + if (content == null) {
|
| + throw new FileSystemException(path, 'File "$path" does not exist.');
|
| + }
|
| + return content;
|
| + }
|
| }
|
|
|
| /**
|
|
|