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

Unified Diff: pkg/front_end/lib/src/fasta/run.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/run.dart
diff --git a/pkg/front_end/lib/src/fasta/run.dart b/pkg/front_end/lib/src/fasta/run.dart
index d143e5241e0749cde4e25191676345a4f0fa917f..575e12c6a9a969e9da3a7f49a7db9a0a63d9c902 100644
--- a/pkg/front_end/lib/src/fasta/run.dart
+++ b/pkg/front_end/lib/src/fasta/run.dart
@@ -21,6 +21,8 @@ import 'fasta.dart' show CompileTask;
import 'deprecated_problems.dart' show deprecated_InputError;
+import 'severity.dart' show Severity;
+
import 'ticker.dart' show Ticker;
const int iterations = const int.fromEnvironment("iterations", defaultValue: 1);
@@ -38,7 +40,8 @@ mainEntryPoint(List<String> arguments) async {
new CompileTask(c, new Ticker(isVerbose: c.options.verbose));
uri = await task.compile();
} on deprecated_InputError catch (e) {
- print(e.deprecated_format());
+ CompilerContext.current
+ .report(deprecated_InputError.toMessage(e), Severity.error);
exit(1);
}
if (exitCode != 0) exit(exitCode);

Powered by Google App Engine
This is Rietveld 408576698