Chromium Code Reviews| 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 ecfe995aef66d5278c11489646758458f43ec760..7b07b5385c7e60e6cc4a6dee6b637ab78540e6ad 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/compiler.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/compiler.dart |
| @@ -504,31 +504,31 @@ 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('The compiler crashed: $message.'); |
| } |
| 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, message); |
| } catch (doubleFault) { |
| // Ignoring exceptions in exception handling. |
| } |
| - throw new CompilerCancelledException(message); |
| + rethrow; |
| } finally { |
| _currentElement = old; |
| } |
| @@ -702,25 +702,20 @@ abstract class Compiler implements DiagnosticListener { |
| internalError(message, element: element); |
| } |
| - void unhandledExceptionOnElement(Element element, |
| - StackTrace stackTrace, |
| - String message) { |
| + void unhandledExceptionOnElement(Element element, String message) { |
| if (hasCrashed) return; |
| hasCrashed = true; |
| reportDiagnostic(spanFromElement(element), |
| MessageKind.COMPILER_CRASHED.error().toString(), |
| api.Diagnostic.CRASH); |
| - pleaseReportCrash(stackTrace, message); |
| + pleaseReportCrash(message); |
| } |
| - void pleaseReportCrash(StackTrace stackTrace, String message) { |
| + void pleaseReportCrash(String message) { |
|
ahe
2013/11/26 11:18:25
I think you can eliminate this argument as well (o
Johnni Winther
2013/11/27 07:58:04
Done.
|
| 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, |
| @@ -774,7 +769,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; |
| @@ -787,7 +782,7 @@ abstract class Compiler implements DiagnosticListener { |
| MessageKind.COMPILER_CRASHED.error().toString(), |
| api.Diagnostic.CRASH); |
| String message = 'The compiler crashed.'; |
| - pleaseReportCrash(trace, message); |
| + pleaseReportCrash(message); |
| } |
| } catch (doubleFault) { |
| // Ignoring exceptions in exception handling. |