| Index: dart/pkg/compiler/lib/src/apiimpl.dart
|
| diff --git a/dart/pkg/compiler/lib/src/apiimpl.dart b/dart/pkg/compiler/lib/src/apiimpl.dart
|
| index 8567fb3f6538c995386242e259016304308e035f..c77e04b00fb07ee1de383f88f0d686d7e02a2529 100644
|
| --- a/dart/pkg/compiler/lib/src/apiimpl.dart
|
| +++ b/dart/pkg/compiler/lib/src/apiimpl.dart
|
| @@ -91,11 +91,17 @@ class Compiler extends leg.Compiler {
|
| userHandlerTask = new leg.GenericTask('Diagnostic handler', this),
|
| userProviderTask = new leg.GenericTask('Input provider', this),
|
| ]);
|
| + if (libraryRoot == null) {
|
| + throw new ArgumentError("[libraryRoot] is null.");
|
| + }
|
| if (!libraryRoot.path.endsWith("/")) {
|
| - throw new ArgumentError("libraryRoot must end with a /");
|
| + throw new ArgumentError("[libraryRoot] must end with a /.");
|
| + }
|
| + if (packageRoot == null) {
|
| + throw new ArgumentError("[packageRoot] is null.");
|
| }
|
| - if (packageRoot != null && !packageRoot.path.endsWith("/")) {
|
| - throw new ArgumentError("packageRoot must end with a /");
|
| + if (!packageRoot.path.endsWith("/")) {
|
| + throw new ArgumentError("[packageRoot] must end with a /.");
|
| }
|
| if (!analyzeOnly) {
|
| if (enableAsyncAwait) {
|
| @@ -309,10 +315,6 @@ class Compiler extends leg.Compiler {
|
| }
|
|
|
| Uri translatePackageUri(leg.Spannable node, Uri uri) {
|
| - if (packageRoot == null) {
|
| - reportFatalError(
|
| - node, leg.MessageKind.PACKAGE_ROOT_NOT_SET, {'uri': uri});
|
| - }
|
| return packageRoot.resolve(uri.path);
|
| }
|
|
|
|
|