# errors.LibTmuxError

- **Module:** errors
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/errors.ts#L150
- **Page:** https://libtmux.org/en/ts/latest/reference/errors-libtmuxerror/

The base of every error this library raises.

Catching this catches all of them, including the ones a future version
adds. `subcommand` names the tmux command that was running, and replaces
the class name in `toString()` when it is known — an error reading
`list-panes: …` says more than one reading `LibTmuxError: …`.

## Members

- `code` (attribute): This class's identifier, declared once per class and written to both {@link code} and `name` on every instance.
- `subcommand` (attribute)
- `constructor` (method)
- `toString` (method)
