# `BB.Error.State.Camera.EndOfCapture`
[🔗](https://github.com/beam-bots/bb_camera/blob/main/lib/bb/error/state/camera/end_of_capture.ex#L5)

Capture stopped cleanly while a consumer was still reading.

Distinct from `BB.Error.Hardware.Camera.CaptureFailed`: the stream ended
because it was asked to, not because anything went wrong.

# `t`

```elixir
@type t() :: %BB.Error.State.Camera.EndOfCapture{
  __exception__: term(),
  bread_crumbs: term(),
  camera: atom(),
  class: term(),
  frame_count: non_neg_integer(),
  path: term(),
  reason: atom(),
  robot: module(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

# `exception`

```elixir
@spec exception(opts :: Keyword.t()) :: %BB.Error.State.Camera.EndOfCapture{
  __exception__: term(),
  bread_crumbs: term(),
  camera: term(),
  class: term(),
  frame_count: term(),
  path: term(),
  reason: term(),
  robot: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

Create an `Elixir.BB.Error.State.Camera.EndOfCapture` without raising it.

## Keys

- :robot
- :camera
- :reason
- :frame_count

---

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