# LibTmux.LibTmuxException

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Exceptions/LibTmuxException.cs#L17
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-libtmuxexception/

Provides the base exception for remote tmux failures.

Every failure carries a <see cref="Dispatch"/> state, so the question a
caller asks in a catch block — is it safe to run this again? — is answered
on the exception rather than inferred from its type.

## Examples

```csharp
catch (LibTmuxException error) when (error.Dispatch == TmuxDispatchState.NotDispatched)
{
    // tmux never saw it, so sending it again repeats nothing.
}
```

## Members

### Common operations

- `Dispatch` (property): Gets whether the command reached tmux, and so whether a retry is safe.

### Other members

- `LibTmuxException` (method): Initializes a LibTmux exception whose dispatch state is unknown.
