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

Unified Diff: pkg/front_end/messages.yaml

Issue 2974203002: Remove prefixes from messages and document why. (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
« no previous file with comments | « pkg/front_end/lib/src/fasta/problems.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/messages.yaml
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index 9e29489bb85f29c978757ccd9ea53ca28f01f86d..16014eefa91a0e8dc7f1f3f1b3a3a57ee4c65327 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -12,6 +12,14 @@
# 3. Examples that produce the message (one of expression, statement,
# declaration, member, script, or bytes).
#
+# A message shouldn't indicate which kind of diagnostic it is, for example,
+# warning or error. Tools are expected to prepend "Warning: ", or "Error: ",
+# and should be allowed to change the kind of diagnostic without affecting the
+# message. For example, an error might be turned into a warning by the tool.
+#
+# A message used for internal errors should have key that starts with
+# "InternalProblem". This way, UX review can prioritize it accordingly.
Siggi Cherem (dart-lang) 2017/07/12 20:37:00 should we also have a boolean property on Code/Mes
ahe 2017/07/13 00:17:06 Good question. I can't make up my mind right now.
+#
# In addition, an entry can contain an analyzer error code (analyzerCode) and a
# dart2js error code (dart2jsCode).
#
@@ -572,32 +580,32 @@ ReturnTypeFunctionExpression:
template: "A function expression can't have a return type."
dart2jsCode: "*ignored*"
-Unhandled:
- template: "Internal error: Unhandled #string in #string2."
+InternalProblemUnhandled:
+ template: "Unhandled #string in #string2."
-Unimplemented:
- template: "Internal error: Unimplemented #string."
+InternalProblemUnimplemented:
+ template: "Unimplemented #string."
-Unexpected:
- template: "Internal error: Expected '#string', but got '#string2'."
+InternalProblemUnexpected:
+ template: "Expected '#string', but got '#string2'."
-Unsupported:
- template: "Internal error: Unsupported operation: '#name'."
+InternalProblemUnsupported:
+ template: "Unsupported operation: '#name'."
InternalProblemSuperclassNotFound:
- template: "Internal error: Superclass not found '#name'."
+ template: "Superclass not found '#name'."
InternalProblemNotFound:
- template: "Internal error: Couldn't find '#name'."
+ template: "Couldn't find '#name'."
InternalProblemNotFoundIn:
- template: "Internal error: Couldn't find '#name' in '#name2'."
+ template: "Couldn't find '#name' in '#name2'."
InternalProblemPrivateConstructorAccess:
- template: "Internal error: Can't access private constructor '#name'."
+ template: "Can't access private constructor '#name'."
InternalProblemConstructorNotFound:
- template: "Internal error: No constructor named '#name' in '#uri'."
+ template: "No constructor named '#name' in '#uri'."
InternalProblemExtendingUnmodifiableScope:
template: "Can't extend an unmodifiable scope."
@@ -606,10 +614,10 @@ InternalProblemPreviousTokenNotFound:
template: "Couldn't find previous token."
InternalProblemStackNotEmpty:
- template: "Internal error: #name.stack isn't empty:\n #string"
+ template: "#name.stack isn't empty:\n #string"
InternalProblemAlreadyInitialized:
- template: "Internal error: Attempt to set initializer on field without initializer."
+ template: "Attempt to set initializer on field without initializer."
InternalProblemBodyOnAbstractMethod:
- template: "Internal error: Attempting to set body on abstract method."
+ template: "Attempting to set body on abstract method."
« no previous file with comments | « pkg/front_end/lib/src/fasta/problems.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698