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
I would sort of have expected an error similar to:
iex > Money.new(:USD, "greg")
{:error,
{Money.InvalidAmountError, "Amount cannot be converted to a number: \"greg\""}}
We have some legacy data floating around that, it turns out have been persisting these due to bad data. We then tried to call Money.to_integer_exp(money) on one of them and that raises:
(We are on Money 5.10.0 at the moment so the stack trace doesn't line up w/ master)
ArithmeticError: bad argument in arithmetic expression
Module "erlang", in :erlang.*/2
File "lib/money.ex", line 1947, in Money.to_integer_exp/2
Curious your thoughts on this; we can figure out a work around on our end pretty easily so we aren't blocked here.
Thanks, again, for everything you do!
The text was updated successfully, but these errors were encountered:
This is probably a sideeffect of the underlying Decimal library, which supports :NaN as well as :inf. Not sure if that's an intended sideeffect or not though.
I was surprised to learn today that this works:
I would sort of have expected an error similar to:
We have some legacy data floating around that, it turns out have been persisting these due to bad data. We then tried to call
Money.to_integer_exp(money)
on one of them and that raises:(We are on Money
5.10.0
at the moment so the stack trace doesn't line up w/ master)Curious your thoughts on this; we can figure out a work around on our end pretty easily so we aren't blocked here.
Thanks, again, for everything you do!
The text was updated successfully, but these errors were encountered: