Index: sdk/lib/_internal/compiler/implementation/source_file_provider.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/source_file_provider.dart b/sdk/lib/_internal/compiler/implementation/source_file_provider.dart |
index ca48fda6604213e825de9370ec84ce16a4187aff..352f03cea24d463cddb793d777128818c793c94c 100644 |
--- a/sdk/lib/_internal/compiler/implementation/source_file_provider.dart |
+++ b/sdk/lib/_internal/compiler/implementation/source_file_provider.dart |
@@ -38,8 +38,9 @@ class SourceFileProvider { |
try { |
source = readAll(uriPathToNative(resourceUri.path)); |
} on FileException catch (ex) { |
- throw "Error reading '${relativize(cwd, resourceUri, isWindows)}' " |
- "(${ex.osError})"; |
+ return new Future.error( |
+ "Error reading '${relativize(cwd, resourceUri, isWindows)}' " |
+ "(${ex.osError})"); |
} |
dartCharactersRead += source.length; |
sourceFiles[resourceUri.toString()] = new SourceFile( |