Index: dart/sdk/lib/_internal/compiler/implementation/compiler.dart |
diff --git a/dart/sdk/lib/_internal/compiler/implementation/compiler.dart b/dart/sdk/lib/_internal/compiler/implementation/compiler.dart |
index ecfe995aef66d5278c11489646758458f43ec760..46bd5a6de28bf5d5b026feda90ede16ddbd9e2f3 100644 |
--- a/dart/sdk/lib/_internal/compiler/implementation/compiler.dart |
+++ b/dart/sdk/lib/_internal/compiler/implementation/compiler.dart |
@@ -513,7 +513,7 @@ abstract class Compiler implements DiagnosticListener { |
pleaseReportCrash(s, 'The compiler crashed: $message.'); |
} |
hasCrashed = true; |
- throw new CompilerCancelledException('The compiler crashed.'); |
+ rethrow; |
} on CompilerCancelledException catch (ex) { |
rethrow; |
} on StackOverflowError catch (ex) { |
@@ -528,7 +528,7 @@ abstract class Compiler implements DiagnosticListener { |
} catch (doubleFault) { |
// Ignoring exceptions in exception handling. |
} |
- throw new CompilerCancelledException(message); |
+ rethrow; |
} finally { |
_currentElement = old; |
} |
@@ -715,12 +715,6 @@ abstract class Compiler implements DiagnosticListener { |
void pleaseReportCrash(StackTrace stackTrace, String message) { |
print(MessageKind.PLEASE_REPORT_THE_CRASH.message({'buildId': buildId})); |
- if (message != null) { |
- print(message); |
- } |
- if (stackTrace != null) { |
- print(stackTrace); |
- } |
} |
void cancel(String reason, {Node node, Token token, |
@@ -775,7 +769,7 @@ abstract class Compiler implements DiagnosticListener { |
totalCompileTime.start(); |
return new Future.sync(() => runCompiler(uri)).catchError((error, trace) { |
- if (error is CompilerCancelledException) { |
+ if (!hasCrashed && error is CompilerCancelledException) { |
log('Error: $error'); |
return false; |
} |