MCPcopy Index your code
hub / github.com/Effect-TS/effect / failures

Function failures

packages/effect/src/internal/cause.ts:199–209  ·  view source on GitHub ↗
(self: Cause.Cause<E>)

Source from the content-addressed store, hash-verified

197
198/** @internal */
199export const failures = <E>(self: Cause.Cause<E>): Chunk.Chunk<E> =>
200 Chunk.reverse(
201 reduce<Chunk.Chunk<E>, E>(
202 self,
203 Chunk.empty<E>(),
204 (list, cause) =>
205 cause._tag === OpCodes.OP_FAIL ?
206 Option.some(pipe(list, Chunk.prepend(cause.error))) :
207 Option.none()
208 )
209 )
210
211/** @internal */
212export const defects = <E>(self: Cause.Cause<E>): Chunk.Chunk<unknown> =>

Callers

nothing calls this directly

Calls 2

reduceFunction · 0.70
pipeFunction · 0.70

Tested by

no test coverage detected