# `LibTmux.Control.ScopeFailure`
[🔗](https://github.com/libtmux/libtmux-elixir/blob/86ad4ca80f157adb0c11f6bf7c371b04ca5aa688/lib/libtmux/control/scope_failure.ex#L1)

A scoped callback finished, but connection cleanup was not proved.

`primary` preserves either `{:return, value}` or
`{:raise, kind, reason, stacktrace}`. `cleanup` holds the separate structured
cleanup error. Callback values stay in the calling process; this wrapper
does not copy them through a bounded connection mailbox or discard them.
See `LibTmux.Control.with_connection/2` for the complete return contract.

# `primary`

```elixir
@type primary(value) ::
  {:return, value} | {:raise, :error | :throw | :exit, term(), list()}
```

The callback's original value or caught exception, throw or exit with its stacktrace.

# `t`

```elixir
@type t(value) :: %LibTmux.Control.ScopeFailure{
  __exception__: term(),
  cleanup: LibTmux.Error.t(),
  primary: primary(value)
}
```

Both primary callback evidence and unproved cleanup; neither implies no command effects.

---

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