# `Ephemeris.Error`
[🔗](https://github.com/joetjen/ephemeris/blob/main/lib/ephemeris/error.ex#L1)

The stable, typed failures Ephemeris returns.

Every failure carries a machine-readable `:code`, a fixed human-readable
`:message`, and `:details` describing the specific occurrence. Match on the
code; the message is for people.

# `t`

```elixir
@type t() :: %Ephemeris.Error{
  __exception__: true,
  code: atom(),
  details: term(),
  message: String.t()
}
```

An error owned by Ephemeris.

# `codes`

```elixir
@spec codes() :: [atom()]
```

Returns every code this module defines.

# `conflicting_parts`

```elixir
@spec conflicting_parts(term()) :: t()
```

Builds the `:conflicting_parts` error: Rule parts contradict each other.

# `invalid_expression`

```elixir
@spec invalid_expression(term()) :: t()
```

Builds the `:invalid_expression` error: Recurrence expression is malformed.

# `invalid_frequency`

```elixir
@spec invalid_frequency(term()) :: t()
```

Builds the `:invalid_frequency` error: Recurrence frequency is not one of the supported values.

# `invalid_part`

```elixir
@spec invalid_part(term()) :: t()
```

Builds the `:invalid_part` error: Rule part has an invalid value.

# `missing_frequency`

```elixir
@spec missing_frequency(term()) :: t()
```

Builds the `:missing_frequency` error: Recurrence rule has no frequency.

# `no_occurrence`

```elixir
@spec no_occurrence(term()) :: t()
```

Builds the `:no_occurrence` error: Rule has no occurrence after the given reference.

# `unknown_part`

```elixir
@spec unknown_part(term()) :: t()
```

Builds the `:unknown_part` error: Rule part is not recognised.

# `unsupported_expression`

```elixir
@spec unsupported_expression(term()) :: t()
```

Builds the `:unsupported_expression` error: Expression is not one this parser understands.

---

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