| Index: lib/src/resolve.dart
|
| diff --git a/lib/src/resolve.dart b/lib/src/resolve.dart
|
| index 7a54520a84c6e9149b78cf3df5d88ea3db8e5edd..053899a4e5985856fd88a80cd9bc83662c90482c 100644
|
| --- a/lib/src/resolve.dart
|
| +++ b/lib/src/resolve.dart
|
| @@ -6,9 +6,14 @@ import "dart:async" show Future;
|
| import "dart:isolate" show Isolate;
|
|
|
| /// Helper function for resolving to a non-relative, non-package URI.
|
| -Future<Uri> resolveUri(Uri uri) async {
|
| +Future<Uri> resolveUri(Uri uri) {
|
| if (uri.scheme == "package") {
|
| - return Isolate.resolvePackageUri(uri);
|
| + return Isolate.resolvePackageUri(uri).then((resolvedUri) {
|
| + if (resolvedUri == null) {
|
| + throw new ArgumentError.value(uri, "uri", "Unknown package");
|
| + }
|
| + return resolvedUri;
|
| + });
|
| }
|
| - return Uri.base.resolveUri(uri);
|
| + return new Future<Uri>.value(Uri.base.resolveUri(uri));
|
| }
|
|
|