# LibTmux.Control.ScopeFailure

- **Module:** LibTmux.Control
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** exception
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/66b9b1c3f3f3186428abdfda2c76f5cf87446710/lib/libtmux/control/scope_failure.ex#L1
- **Bases:** [`Exception`](https://hexdocs.pm/elixir/Exception.html)
- **Page:** https://libtmux.org/en/elixir/latest/reference/libtmux-control-scopefailure/

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.

## Members

### Other members

- [`primary/1`](/en/elixir/latest/reference/libtmux-control-scopefailure-primary-1/) (typealias): The callback's original value or caught exception, throw or exit with its stacktrace.
- [`t/1`](/en/elixir/latest/reference/libtmux-control-scopefailure-t-1/) (typealias): Both primary callback evidence and unproved cleanup; neither implies no command effects.
