Named validation errors
It would be neat if the URL parser had named validation errors like what was done for the HTML Tokenizer in whatwg/html#2701.
FWIW, I'd be supportive of someone adding this to the standard and will happily help out with review.
I have this mostly done. I'll try to finish it up and post something for review.
My 2c: This is an excellent example of an issue for which my opinion changes depending on whether this is in the context of a spec for a data format (the URL string) or for an API (the web API exposed by browsers).
In any particular API, I think named errors are excellent, and I would support adding them to the web API. By contrast, it's not immediately clear to me that there would be value in trying to define these errors on the data format that is a URL string, as the exact manner of error handling is something typically left to an implementation decision, particularly given that error handling is often a context specific and language specific thing. For instance, error design for human consumption and for programmatic use often differ, and I think that the URL format should be agnostic to such concerns.