| Index: pkg/front_end/lib/src/fasta/problems.dart
|
| diff --git a/pkg/front_end/lib/src/fasta/problems.dart b/pkg/front_end/lib/src/fasta/problems.dart
|
| index 26b34233ece93de135e939555334b525553d8d5d..a9105f54fd8234c802cc13c0653ff7486f3a7375 100644
|
| --- a/pkg/front_end/lib/src/fasta/problems.dart
|
| +++ b/pkg/front_end/lib/src/fasta/problems.dart
|
| @@ -4,15 +4,18 @@
|
|
|
| library fasta.problems;
|
|
|
| +import 'compiler_context.dart' show CompilerContext;
|
| +
|
| import 'messages.dart'
|
| show
|
| Message,
|
| - deprecated_format,
|
| templateInternalProblemUnexpected,
|
| templateInternalProblemUnhandled,
|
| templateInternalProblemUnimplemented,
|
| templateInternalProblemUnsupported;
|
|
|
| +import 'severity.dart' show Severity;
|
| +
|
| /// Used to report an internal error.
|
| ///
|
| /// Internal errors should be avoided as best as possible, but are preferred
|
| @@ -23,15 +26,8 @@ import 'messages.dart'
|
| ///
|
| /// Before printing the message, the string `"Internal error: "` is prepended.
|
| dynamic internalProblem(Message message, int charOffset, Uri uri) {
|
| - String text = "Internal error: ${message.message}";
|
| - if (message.tip != null) {
|
| - text += "\n${message.tip}";
|
| - }
|
| - if (uri == null && charOffset == -1) {
|
| - throw text;
|
| - } else {
|
| - throw deprecated_format(uri, charOffset, text);
|
| - }
|
| + throw CompilerContext.current
|
| + .format(message.withLocation(uri, charOffset), Severity.internalProblem);
|
| }
|
|
|
| dynamic unimplemented(String what, [int charOffset = -1, Uri uri = null]) {
|
|
|