Skip to content

Money SQL version 1.6.0

Compare
Choose a tag to compare
@kipcole9 kipcole9 released this 30 Dec 22:23
· 71 commits to master since this release

Enhancements

  • t:Money.Ecto.Composite.Type and t:Money.Ecto.Map.Type now return the exception module when there is an error in cast/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.