Note: I have never encountered this for real. I just noticed this because I went to the MDN page for encodeURIComponent to better learn how it works, and realized this is another way an exception can be thrown in Elm. So I’m reporting this more for documentation and collecting all the weird edge cases.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent#description
Url.percentDecode
is already wrapped in try-catch butUrl.percentEncode
isn’t:https://github.com/elm/url/blob/4e5ee032515581bf01428d54ee636dd601f4bc90/src/Elm/Kernel/Url.js#L7-L22
Note: I have never encountered this for real. I just noticed this because I went to the MDN page for
encodeURIComponent
to better learn how it works, and realized this is another way an exception can be thrown in Elm. So I’m reporting this more for documentation and collecting all the weird edge cases.