# `Localize.FormatError`
[🔗](https://github.com/elixir-localize/localize/blob/v1.2.0/lib/localize/exception/format_error.ex#L1)

Exception raised when a value cannot be formatted by the requested
message format function due to an incompatible type or missing
configuration.

The `:reason` field is a documented atom describing the failure
category. The `:detail` field carries any additional human-readable
context produced by a downstream formatter (for example, the
`Exception.message/1` text of the formatter's own error). The
`:cause` field carries the underlying exception when one is
available, so callers can pattern-match on the inner type.

# `reason`

```elixir
@type reason() ::
  :unbalanced_markup
  | :mismatched_close
  | :formatter_failed
  | :downstream_failure
  | :duplicate_declaration
  | :duplicate_option_name
  | :duplicate_variant
  | :missing_selector_annotation
  | :variant_key_mismatch
  | :missing_fallback_variant
  | :unknown_function
```

# `t`

```elixir
@type t() :: %Localize.FormatError{
  __exception__: term(),
  cause: Exception.t() | nil,
  detail: String.t() | nil,
  function: atom() | nil,
  reason: reason() | nil,
  value: term() | nil
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
