# errors.TmuxCommandError

- **Module:** errors
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-ts/blob/46cccfef2a546de55ce8b308249b8c76339089a0/packages/libtmux/src/errors.ts#L504
- **Page:** https://libtmux.org/en/ts/latest/reference/errors-tmuxcommanderror/

A tmux command that exited non-zero.

The parts are fields rather than a formatted sentence so callers can branch
on them. Matching a message substring is the failure mode this replaces: it
breaks silently when tmux rewords, and it cannot distinguish "already in the
requested state" from a genuine error.

## Members

### Other members

- [`args`](/en/ts/latest/reference/errors-tmuxcommanderror-args/) (attribute)
- [`code`](/en/ts/latest/reference/errors-tmuxcommanderror-code/) (attribute)
- [`constructor`](/en/ts/latest/reference/errors-tmuxcommanderror-constructor/) (method)
- [`exitCode`](/en/ts/latest/reference/errors-tmuxcommanderror-exitcode/) (attribute)
- [`stderr`](/en/ts/latest/reference/errors-tmuxcommanderror-stderr/) (attribute)
- [`stderrIncludes`](/en/ts/latest/reference/errors-tmuxcommanderror-stderrincludes/) (method): Whether tmux's own message contains a phrase, without message parsing at call sites.
- [`stdout`](/en/ts/latest/reference/errors-tmuxcommanderror-stdout/) (attribute): Whatever the command printed before it failed.
- [`target`](/en/ts/latest/reference/errors-tmuxcommanderror-target/) (attribute)

## Guides

Pages that discuss `TmuxCommandError`.

- [Errors and exceptions](/en/ts/latest/topics/errors-and-exceptions/)
