Localize.InvalidValueError exception (Localize v0.32.0)

Copy Markdown View Source

Exception raised when a value does not meet the expected type or constraints for an operation.

:expected is either an atom naming the expected category (for example :rounding_mode, :time_unit, :usage) or a short string label describing the expected shape. :allowed_values, when set, carries the closed list of acceptable values that the rendered message will include.

Summary

Types

t()

@type t() :: %Localize.InvalidValueError{
  __exception__: true,
  allowed_values: [term()] | nil,
  context: term() | nil,
  expected: atom() | String.t() | nil,
  value: term()
}