# tmux.OptionError

- **Module:** tmux
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-go/blob/52968a3181c1c9e6d1b26c565d4b170968ae61c0/tmux/option_error.go#L52
- **Page:** https://libtmux.org/en/go/latest/reference/tmux-optionerror/

OptionError reports a completed high-level option or hook failure. It matches [ErrOption] and a specific option sentinel through errors.Is; callers can recover its fields with errors.As. Library-created errors retain only Result.ExitCode. Error never renders command output because option values and hook commands may be secret; callers may construct exported values with other contents.

## Members

- `Subcommand` (attribute): Subcommand is the failed tmux option or hook subcommand.
- `Name` (attribute): Name is the option or hook name, when available.
- `Result` (attribute): Result contains the library-created error's exit code and no diagnostics.
- `Error` (method): Error implements error.
- `Unwrap` (method): Unwrap makes OptionError compatible with ErrOption and its specific kinds.
