NET-A-PORTER/scala-uri

Raise more descriptive exception for invalid URI?

JustAHappyKid opened this issue · 4 comments

For example, Uri.parse("http://test.net/##") will yield a org.parboiled2.ParseError. This is mildly confusing, as (first) it's not immediately clear what the exception is related to, but also because it leaves one wondering whether there's a bug in scala-uri or whether an illegitimate URI has genuinely been rejected.

Perhaps a custom exception class extending from java.net.URISyntaxException would be the way to go?

👍

Thanks for raising this. Commit is in master and will be in the next release.

Thanks!

Thx