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

A command crashed during execution.

This error is returned to callers awaiting a command result when the
command's callback raises an exception.

# `t`

```elixir
@type t() :: %BB.Error.State.CommandCrashed{
  __exception__: true,
  bread_crumbs: term(),
  class: term(),
  command: module(),
  exception: Exception.t(),
  path: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

# `exception`

```elixir
@spec exception(opts :: Keyword.t()) :: %BB.Error.State.CommandCrashed{
  __exception__: true,
  bread_crumbs: term(),
  class: term(),
  command: term(),
  exception: term(),
  path: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

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

## Keys

- :command
- :exception

---

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