# LibTmux.Internal.OptionFailure.ThrowIfFailed

- **Module:** LibTmux.Internal.OptionFailure
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Internal/OptionFailure.cs#L10
- **Page:** https://libtmux.org/reference/dotnet/libtmux-internal-optionfailure-throwiffailed/

```
LibTmux.Internal.OptionFailure.ThrowIfFailed(result: TmuxCommandResult, optionName: string) -> void
```

Throws when tmux rejected an option command.

## Parameters

- `result` (TmuxCommandResult) — What the command returned.
- `optionName` (string) — The option the command named.

## Raises

- `TmuxOptionException` — tmux reported a failure.
