Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(405)

Unified Diff: tests/compiler/dart2js/memory_source_file_helper.dart

Issue 23583041: Don't expect String on read-errors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/memory_source_file_helper.dart
diff --git a/tests/compiler/dart2js/memory_source_file_helper.dart b/tests/compiler/dart2js/memory_source_file_helper.dart
index 8ebdf7d6763223ad1d2c4e5f63cbb651b049349b..135b025b1160a8732fac3907ff87a753a4b7e3fe 100644
--- a/tests/compiler/dart2js/memory_source_file_helper.dart
+++ b/tests/compiler/dart2js/memory_source_file_helper.dart
@@ -33,8 +33,9 @@ class MemorySourceFileProvider extends SourceFileProvider {
return super.readStringFromUri(resourceUri);
}
String source = memorySourceFiles[resourceUri.path];
- // TODO(ahe): Return new Future.error(...) ?
- if (source == null) return new Future.error('No such file $resourceUri');
+ if (source == null) {
+ return new Future.error(new Exception('No such file $resourceUri'));
ahe 2013/09/10 10:50:28 Why do you need to wrap this in an exception?
Johnni Winther 2013/09/10 11:41:53 I don't need to, but I found the type error in rep
+ }
String resourceName = '$resourceUri';
this.sourceFiles[resourceName] = new SourceFile(resourceName, source);
return new Future.value(source);
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/apiimpl.dart ('k') | tests/compiler/dart2js/missing_file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698