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

Unified Diff: pkg/front_end/lib/src/fasta/fasta.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/fasta.dart
diff --git a/pkg/front_end/lib/src/fasta/fasta.dart b/pkg/front_end/lib/src/fasta/fasta.dart
index d9a483ee768435debdd887dd8fefd68115055346..5b916c11e972879e4686e0a32883be584dfc73b3 100644
--- a/pkg/front_end/lib/src/fasta/fasta.dart
+++ b/pkg/front_end/lib/src/fasta/fasta.dart
@@ -29,6 +29,8 @@ import 'dill/dill_target.dart' show DillTarget;
import 'compile_platform.dart' show compilePlatformInternal;
+import 'severity.dart' show Severity;
+
import 'ticker.dart' show Ticker;
import 'uri_translator.dart' show UriTranslator;
@@ -79,7 +81,8 @@ Future<KernelTarget> outline(List<String> arguments) async {
});
} on deprecated_InputError catch (e) {
exitCode = 1;
- print(e.deprecated_format());
+ CompilerContext.current
+ .report(deprecated_InputError.toMessage(e), Severity.error);
return null;
}
}
@@ -97,7 +100,8 @@ Future<Uri> compile(List<String> arguments) async {
});
} 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