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

Unified Diff: pkg/front_end/lib/src/fasta/compile_platform.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/compile_platform.dart
diff --git a/pkg/front_end/lib/src/fasta/compile_platform.dart b/pkg/front_end/lib/src/fasta/compile_platform.dart
index 3806ed97ba864d23ddae28abea4394fb225c5d8c..0cd6c4681fadc8d8147fe39cbe1e24f44a7a7ed7 100644
--- a/pkg/front_end/lib/src/fasta/compile_platform.dart
+++ b/pkg/front_end/lib/src/fasta/compile_platform.dart
@@ -22,6 +22,8 @@ import 'deprecated_problems.dart' show deprecated_InputError;
import 'kernel/utils.dart' show writeProgramToFile;
+import 'severity.dart' show Severity;
+
import 'ticker.dart' show Ticker;
const int iterations = const int.fromEnvironment("iterations", defaultValue: 1);
@@ -35,7 +37,8 @@ Future mainEntryPoint(List<String> arguments) async {
await compilePlatform(arguments);
} on deprecated_InputError catch (e) {
exitCode = 1;
- print(e.deprecated_format());
+ CompilerContext.current
+ .report(deprecated_InputError.toMessage(e), Severity.error);
return null;
}
}

Powered by Google App Engine
This is Rietveld 408576698