Re: [whatwg/url] Named validation errors (#502)

@domenic commented on this pull request.



> @@ -85,6 +85,170 @@ valid input. User agents, especially conformance checkers, are encouraged to rep
  unclear to other developers.
 </div>
 
+<table>
+ <thead>
+  <tr>
+   <th>Error Code
+   <th>Error Message
+ <tbody>
+  <tr>
+   <td><dfn>unexpected-c0-control-or-space</dfn>
+   <td>This error occurs when the input to the URL parser contains leading or trailing
+   <a>C0 control or space</a> code points. The URL parser subsequently strips any matching code
+   points.
+  <tr>
+   <td><dfn>unexpected-ascii-tab-or-newline</dfn>

I like the all-lowercase style personally.

In general really unclear what these identifiers are to be used for and what conventions they should follow, so we're just making up our own rules. Other systems might use numeric error codes, or SHOUTY_CASE variants which could be used as variable names in most programming languages. Or, we could ask, why are we using dashes instead of spaces?

Similar questions have come up in the unrelated context of Web IDL enumerations. There we've mostly settled on lower-kebab-case, I think.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/pull/502#discussion_r423103587

Received on Monday, 11 May 2020 15:00:30 UTC