Index: tests/utils/recursive_import_test.dart |
diff --git a/tests/utils/recursive_import_test.dart b/tests/utils/recursive_import_test.dart |
index f827089997e55ff92b8ad35f1f7c2e6daf2b0313..66d9fea34fa520245436130f8341d5689e6b2351 100644 |
--- a/tests/utils/recursive_import_test.dart |
+++ b/tests/utils/recursive_import_test.dart |
@@ -69,7 +69,7 @@ main() { |
String source; |
if (uri.path.length > 100) { |
// Simulate an OS error. |
- throw 'Path length exceeded'; |
+ return new Future.error('Path length exceeded'); |
} else if (uri.scheme == "main") { |
count++; |
source = RECURSIVE_MAIN; |
@@ -86,7 +86,7 @@ main() { |
source = "library lib${uri.path.replaceAll('/', '.')};"; |
} |
} else { |
- throw "unexpected URI $uri"; |
+ return new Future.error("unexpected URI $uri"); |
} |
return new Future.value(source); |
} |