The way we handle this exception is related to `io.newURI`, so I would keep io.newURI here.
I'm not really convinced we should abstract io.newURI/getUrlObj in this patch.
The webapps-manifest refactoring is already big enough.
You should aim to minimize the size of this patch by focusing on just one refactoring at a time.
Do not hesitate to split your patch in independant refactoring.
You can submit multiple patches in one bug or open followups.