# errors.LibTmuxError

- **Module:** errors
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-ts/blob/46cccfef2a546de55ce8b308249b8c76339089a0/packages/libtmux/src/errors.ts#L174
- **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`](/en/ts/latest/reference/errors-libtmuxerror-subcommand/) names the tmux command that was running, and replaces
the class name in [`toString()`](/en/ts/latest/reference/errors-libtmuxerror-tostring/) when it is known — an error reading
[`list-panes: …`](/en/tmux/latest/manual/list-panes/) says more than one reading `LibTmuxError: …`.

## Members

### Other members

- [`code`](/en/ts/latest/reference/errors-libtmuxerror-code/) (attribute): This class's identifier, declared once per class and written to both {@link code} and `name` on every instance.
- [`constructor`](/en/ts/latest/reference/errors-libtmuxerror-constructor/) (method)
- [`subcommand`](/en/ts/latest/reference/errors-libtmuxerror-subcommand/) (attribute)
- [`toString`](/en/ts/latest/reference/errors-libtmuxerror-tostring/) (method)
