Fails

data class Fails(val cause: Throwable) : TeardownFault

Delegate the close, then throw cause.

Delegate-first is deliberate. It models the common real shape — the close threw while flushing, but the link underneath is dead anyway — and it leaves every other invariant of the harness settled, so a test can keep asserting about rosters, peers and seam state after the failure instead of unwinding into an unknown half-closed world. The alternative (throw without delegating) models a transport whose close is a pure no-op failure, which is both rarer and strictly less useful to assert against.

cause must not be a CancellationException, and that is enforced

Injecting a seam-minted cancellation would test whether a consumer defends against a contract-violating us.tractat.kuilt.core.Seam — a strictly stronger demand than the contract makes today. Seam.close itself carries the no-minting obligation (#1826), and SeamRoom.leave calls seam.close(...) unguarded, so such an arm would ship a suite that fails rather than a guard that holds. Whether Room.leave should defend against it is a real question, deliberately deferred: see #2518.

Constructors

Link copied to clipboard
constructor(cause: Throwable)

Properties

Link copied to clipboard