Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(468)

Side by Side Diff: pkg/compiler/lib/src/dart2js.dart

Issue 923103003: Avoid spurious "The compiler crashed" messages in batch mode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix indentation. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/compiler/dart2js/dart2js_batch2_run.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.cmdline; 5 library dart2js.cmdline;
6 6
7 import 'dart:async' 7 import 'dart:async'
8 show Future, EventSink; 8 show Future, EventSink;
9 import 'dart:convert' show UTF8, LineSplitter; 9 import 'dart:convert' show UTF8, LineSplitter;
10 import 'dart:io' 10 import 'dart:io'
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 return; 647 return;
648 } 648 }
649 internalMain(arguments); 649 internalMain(arguments);
650 } 650 }
651 651
652 var exitFunc = exit; 652 var exitFunc = exit;
653 var compileFunc = api.compile; 653 var compileFunc = api.compile;
654 654
655 Future<api.CompilationResult> internalMain(List<String> arguments) { 655 Future<api.CompilationResult> internalMain(List<String> arguments) {
656 Future onError(exception, trace) { 656 Future onError(exception, trace) {
657 // If we are already trying to exit, just continue exiting.
658 if (exception == _EXIT_SIGNAL) throw exception;
659
657 try { 660 try {
658 print('The compiler crashed: $exception'); 661 print('The compiler crashed: $exception');
659 } catch (ignored) { 662 } catch (ignored) {
660 print('The compiler crashed: error while printing exception'); 663 print('The compiler crashed: error while printing exception');
661 } 664 }
662 665
663 try { 666 try {
664 if (trace != null) { 667 if (trace != null) {
665 print(trace); 668 print(trace);
666 } 669 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 } else if (exitCode == 253) { 720 } else if (exitCode == 253) {
718 print(">>> TEST CRASH"); 721 print(">>> TEST CRASH");
719 } else { 722 } else {
720 print(">>> TEST FAIL"); 723 print(">>> TEST FAIL");
721 } 724 }
722 stderr.writeln(">>> EOF STDERR"); 725 stderr.writeln(">>> EOF STDERR");
723 subscription.resume(); 726 subscription.resume();
724 }); 727 });
725 }); 728 });
726 } 729 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/dart2js_batch2_run.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698