Money SQL version 1.6.0
Enhancements
t:Money.Ecto.Composite.Typeandt:Money.Ecto.Map.Typenow 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.InvalidAmountErrorMoney.UnknownCurrencyErrorMoney.ParseError
Thanks to @DaTrader for the enhancement request.