MatchError exception (Elixir v1.20.0-dev)

View Source

An exception raised when a pattern match (=/2) fails.

For example:

iex> [_ | _] = []
** (MatchError) no match of right hand side value:
...

The following fields of this exception are public and can be accessed freely:

  • :term (term/0) - the term that did not match the pattern