Money SQL version 1.6.0
Enhancements
t:Money.Ecto.Composite.Type
andt:Money.Ecto.Map.Type
now return the exception module when there is an error incast/1
. For example:
iex> Money.Ecto.Composite.Type.cast("") ==
{:error,
[
exception: Money.InvalidAmountError,
message: "Amount cannot be converted to a number: \"\""
]}
The expected exceptions are:
Money.InvalidAmountError
Money.UnknownCurrencyError
Money.ParseError
Thanks to @DaTrader for the enhancement request.