| Index: sdk/lib/_internal/compiler/implementation/compiler.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/compiler.dart b/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| index 34a55ff5247651d37a92da4e6c554e0487b5668d..732ea3f654fef70efbc4ca226cb6e4e0d298c75b 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| @@ -504,31 +504,30 @@ abstract class Compiler implements DiagnosticListener {
|
| _currentElement = element;
|
| try {
|
| return f();
|
| - } on SpannableAssertionFailure catch (ex, s) {
|
| + } on SpannableAssertionFailure catch (ex) {
|
| if (!hasCrashed) {
|
| String message = (ex.message != null) ? tryToString(ex.message)
|
| : tryToString(ex);
|
| SourceSpan span = spanFromSpannable(ex.node);
|
| reportError(ex.node, MessageKind.GENERIC, {'text': message});
|
| - pleaseReportCrash(s, 'The compiler crashed: $message.');
|
| + pleaseReportCrash();
|
| }
|
| hasCrashed = true;
|
| - throw new CompilerCancelledException('The compiler crashed.');
|
| + rethrow;
|
| } on CompilerCancelledException catch (ex) {
|
| rethrow;
|
| } on StackOverflowError catch (ex) {
|
| // We cannot report anything useful in this case, because we
|
| // do not have enough stack space.
|
| rethrow;
|
| - } catch (ex, s) {
|
| + } catch (ex) {
|
| if (hasCrashed) rethrow;
|
| - String message = 'The compiler crashed: ${tryToString(ex)}.';
|
| try {
|
| - unhandledExceptionOnElement(element, s, message);
|
| + unhandledExceptionOnElement(element);
|
| } catch (doubleFault) {
|
| // Ignoring exceptions in exception handling.
|
| }
|
| - throw new CompilerCancelledException(message);
|
| + rethrow;
|
| } finally {
|
| _currentElement = old;
|
| }
|
| @@ -704,25 +703,17 @@ abstract class Compiler implements DiagnosticListener {
|
| internalError(message, element: element);
|
| }
|
|
|
| - void unhandledExceptionOnElement(Element element,
|
| - StackTrace stackTrace,
|
| - String message) {
|
| + void unhandledExceptionOnElement(Element element) {
|
| if (hasCrashed) return;
|
| hasCrashed = true;
|
| reportDiagnostic(spanFromElement(element),
|
| MessageKind.COMPILER_CRASHED.error().toString(),
|
| api.Diagnostic.CRASH);
|
| - pleaseReportCrash(stackTrace, message);
|
| + pleaseReportCrash();
|
| }
|
|
|
| - void pleaseReportCrash(StackTrace stackTrace, String message) {
|
| + void pleaseReportCrash() {
|
| 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,
|
| @@ -776,7 +767,7 @@ abstract class Compiler implements DiagnosticListener {
|
| Future<bool> run(Uri uri) {
|
| totalCompileTime.start();
|
|
|
| - return new Future.sync(() => runCompiler(uri)).catchError((error, trace) {
|
| + return new Future.sync(() => runCompiler(uri)).catchError((error) {
|
| if (error is CompilerCancelledException) {
|
| log('Error: $error');
|
| return false;
|
| @@ -788,8 +779,7 @@ abstract class Compiler implements DiagnosticListener {
|
| reportDiagnostic(new SourceSpan(uri, 0, 0),
|
| MessageKind.COMPILER_CRASHED.error().toString(),
|
| api.Diagnostic.CRASH);
|
| - String message = 'The compiler crashed.';
|
| - pleaseReportCrash(trace, message);
|
| + pleaseReportCrash();
|
| }
|
| } catch (doubleFault) {
|
| // Ignoring exceptions in exception handling.
|
|
|