Chromium Code Reviews| Index: lib/src/compiler/compiler.dart |
| diff --git a/lib/src/compiler/compiler.dart b/lib/src/compiler/compiler.dart |
| index 6355dcfb17485850c1f094aaa6b85c127a0808e4..7be197079a8b450a7a9f402a6192c7ea86c35aa4 100644 |
| --- a/lib/src/compiler/compiler.dart |
| +++ b/lib/src/compiler/compiler.dart |
| @@ -4,6 +4,7 @@ |
| import 'dart:collection' show HashSet; |
| import 'package:args/args.dart' show ArgParser, ArgResults; |
| +import 'package:args/src/usage_exception.dart' show UsageException; |
| import 'package:analyzer/analyzer.dart' |
| show |
| AnalysisError, |
| @@ -82,6 +83,11 @@ class ModuleCompiler { |
| ' The file name is in the wrong format or was not found.'); |
| } |
| + if (!source.exists()) { |
| + throw new UsageException('Given file "$sourcePath" does not exist.', |
| + 'You need to pass at least one existing .dart file as an argument.'); |
|
Jennifer Messerly
2016/07/18 19:22:01
long line
stanm
2016/07/18 21:37:29
Thanks, I noticed that, but the formatter seems to
|
| + } |
| + |
| // Ignore parts. They need to be handled in the context of their library. |
| if (context.computeKindOf(source) == SourceKind.PART) { |
| explicitParts.add(source); |