Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Unified Diff: pkg/front_end/lib/src/fasta/loader.dart

Issue 2977013002: Report messages instead of just printing. (Closed)
Patch Set: Update expectations. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/loader.dart
diff --git a/pkg/front_end/lib/src/fasta/loader.dart b/pkg/front_end/lib/src/fasta/loader.dart
index 08fa08f19c91f5496456f486eb91d12af4418d5a..743dcf6eaf3e20bf9026f5a580d4ddb88275eebc 100644
--- a/pkg/front_end/lib/src/fasta/loader.dart
+++ b/pkg/front_end/lib/src/fasta/loader.dart
@@ -10,12 +10,13 @@ import 'dart:collection' show Queue;
import 'builder/builder.dart' show Builder, LibraryBuilder;
-import 'deprecated_problems.dart'
- show firstSourceUri, deprecated_printUnexpected;
+import 'deprecated_problems.dart' show firstSourceUri;
import 'messages.dart'
show LocatedMessage, Message, messagePlatformPrivateLibraryAccess;
+import 'severity.dart' show Severity;
+
import 'target_implementation.dart' show TargetImplementation;
import 'ticker.dart' show Ticker;
@@ -174,7 +175,8 @@ ${format(ms / libraryCount, 3, 12)} ms/compilation unit.""");
void addCompileTimeError(Message message, int charOffset, Uri fileUri,
{bool silent: false, bool wasHandled: false}) {
if (!silent) {
- deprecated_printUnexpected(fileUri, charOffset, message.message);
+ target.context
+ .report(message.withLocation(fileUri, charOffset), Severity.error);
}
(wasHandled ? handledErrors : unhandledErrors)
.add(message.withLocation(fileUri, charOffset));

Powered by Google App Engine
This is Rietveld 408576698