You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All our error messages must start with a lowercase letter and must not end with a dot.
299
-
Additionally, critical (unrecoverable) errors should start with "failed to ...".
300
-
Potentially recoverable errors should start with "unable to ...".
299
+
It is recommended to start the error messages with "failed to..." or "unable to ...".
301
300
302
301
[WARNING.code-rule,caption=Examples of incorrect code for this rule]
303
302
====
@@ -336,6 +335,16 @@ enum Error {
336
335
337
336
====
338
337
338
+
==== Examples for "failed to ..." error messages
339
+
340
+
. `failed to parse config file` to indicate the parsing of the config file failed, usually because the file doesn't conform to the configuration language.
341
+
. `failed to construct http client` to indicate we wanted to construct a HTTP client to retrieve remote content.
342
+
343
+
==== Exampled for "unable to ..." error messages
344
+
345
+
. `unable to read config file from ...` to indicate we could load the file (for example because the file doesn't exist).
346
+
. `unable to parse value ...` to indicate we failed to parse a user provided value which didn't conform to the expected syntax.
347
+
339
348
== String formatting
340
349
341
350
=== Named versus unnamed format string identifiers
0 commit comments