<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Tor",
  "identifier" : "/documentation/Tor/TorState/failed(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Tor"
    ],
    "preciseIdentifier" : "s:3Tor0A5StateO6failedyAcA0A5ErrorOcACmF"
  },
  "title" : "TorState.failed(_:)"
}
-->

# TorState.failed(_:)

Terminal/transient error state carrying the causal [`TorError`](/documentation/Tor/TorError).

```
case failed(TorError)
```

## Discussion

Observed when `tor_run_main()` returns a non-zero exit status, the
start pipeline throws, or an internal assertion fires. The
associated value surfaces the underlying cause: typically
[`TorError.startFailed(_:)`](/documentation/Tor/TorError/startFailed(_:)) or [`TorError.ioError(_:)`](/documentation/Tor/TorError/ioError(_:)).
`.failed(_)` is **transient** — a subsequent [`start()`](/documentation/Tor/TorClient/start())
transitions back to `.starting`; state is not sticky.