| 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 d13da550c6b8a3809a3797be106b85ee7f9521e4..2551bf87be79a77f8ebbbffe9e80a602d417794a 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| @@ -499,10 +499,7 @@ abstract class Compiler implements DiagnosticListener {
|
| return f();
|
| } 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});
|
| + reportAssertionFailure(ex);
|
| pleaseReportCrash();
|
| }
|
| hasCrashed = true;
|
| @@ -1397,6 +1394,13 @@ abstract class Compiler implements DiagnosticListener {
|
|
|
| void reportDiagnostic(SourceSpan span, String message, api.Diagnostic kind);
|
|
|
| + void reportAssertionFailure(SpannableAssertionFailure ex) {
|
| + String message = (ex.message != null) ? tryToString(ex.message)
|
| + : tryToString(ex);
|
| + SourceSpan span = spanFromSpannable(ex.node);
|
| + reportError(ex.node, MessageKind.GENERIC, {'text': message});
|
| + }
|
| +
|
| SourceSpan spanFromTokens(Token begin, Token end, [Uri uri]) {
|
| if (begin == null || end == null) {
|
| // TODO(ahe): We can almost always do better. Often it is only
|
|
|