# `BB.Error.State.OutsideJointHistory`
[🔗](https://github.com/beam-bots/bb/blob/main/lib/bb/error/state/outside_joint_history.ex#L5)

A joint configuration was asked for at a time the history can't answer.

Returned by `BB.Robot.State.get_all_configurations_at/2` in two cases,
distinguished by `direction`:

- `:past` - the time is older than `joint`'s oldest retained sample, either
  because it has aged out of the history or because it predates the robot
  starting. `boundary_time` is that oldest sample's time.
- `:future` - the time is later than now. Nothing can be known about it yet,
  and the history refuses to extrapolate. `joint` is `nil`, since it applies
  to every joint, and `boundary_time` is the current monotonic time.

All times are `System.monotonic_time(:nanosecond)` values.

# `t`

```elixir
@type t() :: %BB.Error.State.OutsideJointHistory{
  __exception__: term(),
  boundary_time: integer(),
  bread_crumbs: term(),
  class: term(),
  direction: :past | :future,
  joint: atom() | nil,
  path: term(),
  requested_time: integer(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

# `exception`

```elixir
@spec exception(opts :: Keyword.t()) :: %BB.Error.State.OutsideJointHistory{
  __exception__: term(),
  boundary_time: term(),
  bread_crumbs: term(),
  class: term(),
  direction: term(),
  joint: term(),
  path: term(),
  requested_time: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

Create an `Elixir.BB.Error.State.OutsideJointHistory` without raising it.

## Keys

- :direction
- :joint
- :requested_time
- :boundary_time

---

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