Index: pkg/compiler/tool/generate_kernel.dart |
diff --git a/pkg/compiler/tool/generate_kernel.dart b/pkg/compiler/tool/generate_kernel.dart |
index 2ed2aa2680b5f8b6f947ea5ca6a5c445cd7ba8d9..1414ad549bbda460636d000fc3413b6d70d6883b 100644 |
--- a/pkg/compiler/tool/generate_kernel.dart |
+++ b/pkg/compiler/tool/generate_kernel.dart |
@@ -23,8 +23,8 @@ main(List<String> args) async { |
..target = new Dart2jsTarget(new TargetFlags()) |
..packagesFileUri = Uri.base.resolve('.packages') |
..compileSdk = true |
- ..linkedDependencies = [Uri.base.resolve(flags['platform'])] |
- ..onError = errorHandler; |
+ ..setExitCodeOnProblem = true |
+ ..linkedDependencies = [Uri.base.resolve(flags['platform'])]; |
if (flags.rest.isEmpty) { |
var script = relativizeUri(Platform.script); |
@@ -39,11 +39,6 @@ main(List<String> args) async { |
await writeProgramToBinary(program, flags['out']); |
} |
-void errorHandler(CompilationError e) { |
- exitCode = 1; |
- print(e.message); |
-} |
- |
ArgParser _argParser = new ArgParser() |
..addOption('platform', |
help: 'location of the precompiled dart2js sdk', |