MCPcopy Create free account
hub / github.com/Effect-TS/effect / onCause

Function onCause

packages/effect/src/Channel.ts:440–441  ·  view source on GitHub ↗
(cause: Cause.Cause<EX | OutErr | Cause.Done<OutDone>>)

Source from the content-addressed store, hash-verified

438 Effect.fnUntraced(function*(upstream, scope) {
439 const closableScope = Scope.forkUnsafe(scope)
440 const onCause = (cause: Cause.Cause<EX | OutErr | Cause.Done<OutDone>>) =>
441 Scope.close(closableScope, Pull.doneExitFromCause(cause))
442 const pull = yield* Effect.onError(
443 f(upstream, scope, closableScope),
444 onCause

Callers 1

holdFunction · 0.85

Calls 1

closeMethod · 0.65

Tested by

no test coverage detected