uri_string weird inconsistency

Peter Dimitrov peterdmv@REDACTED
Mon Nov 25 10:56:01 CET 2019


This is a bug in the type spec and as far as I see the catch is unnecessary
in uri_string:normalize/1 as exceptions are already caught in all other
functions that are called by normalize.

The intended behavior is to always return an error tuple in case of an


-----Original Message-----
From: erlang-questions <erlang-questions-bounces@REDACTED> On Behalf Of
Loïc Hoguin
Sent: den 23 november 2019 17:21
To: Erlang Questions <erlang-questions@REDACTED>
Subject: uri_string weird inconsistency


Why does uri_string:normalize/1 catch a throw and return an error tuple,
but uri_string:normalize/2 does not? Both are documented functions and this
behavior difference is not documented, besides the 2-arity not having
error() as a returned type:


Is this an oversight perhaps?



Loïc Hoguin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20191125/9dec9ee9/attachment.htm>

More information about the erlang-questions mailing list