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

Unified Diff: pkg/front_end/tool/_fasta/generate_messages.dart

Issue 2979623002: Use messages for (some) public API errors (Closed)
Patch Set: 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/tool/_fasta/generate_messages.dart
diff --git a/pkg/front_end/tool/_fasta/generate_messages.dart b/pkg/front_end/tool/_fasta/generate_messages.dart
index 6915d4fae03cabce6880b18e415676b68fb17db4..e04d087148edbc25716187982fde90c8bf129c7d 100644
--- a/pkg/front_end/tool/_fasta/generate_messages.dart
+++ b/pkg/front_end/tool/_fasta/generate_messages.dart
@@ -51,6 +51,10 @@ final RegExp placeholderPattern = new RegExp("#[a-zA-Z0-9_]+");
String compileTemplate(String name, String template, String tip,
String analyzerCode, String dart2jsCode) {
+ if (template == null) {
+ print('missing template for message: $name');
+ return '';
Paul Berry 2017/07/11 16:00:59 Would it be better to throw an exception here, to
Siggi Cherem (dart-lang) 2017/07/12 00:29:46 Done.
+ }
var parameters = new Set<String>();
var conversions = new Set<String>();
var arguments = new Set<String>();

Powered by Google App Engine
This is Rietveld 408576698