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

Function onFailure

packages/effect/src/Stream.ts:7727–7732  ·  view source on GitHub ↗
(cause_)

Source from the content-addressed store, hash-verified

7725 return Effect.succeed(chunks)
7726 },
7727 onFailure(cause_) {
7728 // The buffer has already advanced by step after a full window.
7729 if (list.length === 0 || (emitted && list.length <= windowSize - step)) return Effect.failCause(cause_)
7730 cause = cause_
7731 return Effect.succeed(Arr.of(MutableList.takeAll(list) as any))
7732 }
7733 })
7734
7735 return Effect.suspend(() => cause ? Effect.failCause(cause) : pull)

Callers 1

Result.tsFile · 0.70

Calls 3

ofMethod · 0.65
takeAllMethod · 0.65
succeedMethod · 0.45

Tested by

no test coverage detected