# io.github.libtmux.SessionCreation.failureMessage

- **Module:** io.github.libtmux
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/c067fced0dfd19bd6dd3d260e9d4c336becdb063/libtmux/src/main/java/io/github/libtmux/SessionCreation.java#L24
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-sessioncreation-sessioncreation-failuremessage/

```
static String failureMessage(
        ServerConfig config,
        CommandResult result)
```

tmux exits 0 even when nothing was created: an explicit {@code -S} under a directory that does not exist prints its own {@code error creating ...} and still returns success, and a binary that is not tmux at all can exit 0 with nothing on stdout the same way {@code run} cannot tell apart from a real session id. Reads tmux's own words when it spoke and names the configured binary when it did not, rather than letting an empty list reach {@code SessionId} and throw an unchecked collection exception with neither in it.

A tmux that exits without a word when it cannot create its socket, because the server queues
the error and tells the client to exit before the error reaches it, leaves nothing to read. So
a silent exit checks the one cause this client can see for itself.

## Parameters

- `config` (`ServerConfig`)
- `result` (`CommandResult`)
