You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To reproduce the error, try calling Float.parse("358.0e5437") from iex. Could this be a bug in Elixir's implementation of Float.parse/1? I would expect exceptions to be caught and :error returned per the documentation.
The text was updated successfully, but these errors were encountered:
After discussing this error on elixir-lang/elixir#3862 I updated the documentation for Float.parse/1; the ArgumentError can be expected for the time being. I think the solution is to rescue those errors when parsing floats; I'll put together a PR for that if you want me to @jclem.
A PR would be great! Not to get into an unrelated discussion on here, but I'm considering removing the value parsing altogether in a future version, and leaving that up to the user.
After discussing this error on elixir-lang/elixir#3862 I updated the documentation for Float.parse/1; the ArgumentError can be expected for the time being. I think the solution is to rescue those errors when parsing floats; I'll put together a PR for that if you want me to @jclem.
—
Reply to this email directly or view it on GitHub.
We've been having the following error when parsing certain log entries:
The issue appears to be in
Decoder.coerce_value/1
:https://github.com/jclem/logfmt-elixir/blob/master/lib/decoder.ex#L146
To reproduce the error, try calling
Float.parse("358.0e5437")
fromiex
. Could this be a bug in Elixir's implementation ofFloat.parse/1
? I would expect exceptions to be caught and:error
returned per the documentation.The text was updated successfully, but these errors were encountered: