Cldr.Unit.new-exclamation-mark

You're seeing just the function new-exclamation-mark, go back to Cldr.Unit module for more information.
Link to this function

new!(unit, value, options \\ [])

View Source

Returns a new Unit.t struct or raises on error.

Arguments

Returns

  • unit or

  • raises an exception

Examples

iex> Cldr.Unit.new! 23, :gallon
#Cldr.Unit<:gallon, 23>

Cldr.Unit.new! 14, :gadzoots
** (Cldr.UnknownUnitError) The unit :gadzoots is not known.
    (ex_cldr_units) lib/cldr/unit.ex:57: Cldr.Unit.new!/2