# `BeamConsole.ReasonSummary`
[🔗](https://github.com/cristianodabc/beam-console/blob/v0.5.4/lib/beam_console/reason_summary.ex#L1)

Converts process exit reasons into bounded, non-sensitive summaries.

Arbitrary binaries, lists, maps, PIDs, references, functions, and ports are
described structurally rather than copied. This prevents raw application
terms or credentials from entering recorder history.

# `category`

```elixir
@type category() :: :normal | :shutdown | :killed | :missing | :connection | :error
```

# `t`

```elixir
@type t() :: %BeamConsole.ReasonSummary{category: category(), text: String.t()}
```

# `sanitize`

```elixir
@spec sanitize(term(), keyword()) :: t()
```

Returns a categorized structural summary under a byte limit.

## Examples

    iex> BeamConsole.ReasonSummary.sanitize(:normal)
    %BeamConsole.ReasonSummary{category: :normal, text: "normal"}

    iex> summary = BeamConsole.ReasonSummary.sanitize({:badmatch, "secret"})
    iex> {summary.category, summary.text}
    {:error, "{badmatch, binary(6 bytes)}"}

---

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