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

Function deepErrorEffect

packages/effect/test/Effect/error-handling.test.ts:23–30  ·  view source on GitHub ↗
(n: number)

Source from the content-addressed store, hash-verified

21const ExampleErrorFail: Effect.Effect<never, Error, never> = Effect.fail(ExampleError)
22
23const deepErrorEffect = (n: number): Effect.Effect<void, Cause.UnknownException> => {
24 if (n === 0) {
25 return Effect.try(() => {
26 throw ExampleError
27 })
28 }
29 return pipe(Effect.void, Effect.zipRight(deepErrorEffect(n - 1)))
30}
31
32const deepErrorFail = (n: number): Effect.Effect<never, Error> => {
33 if (n === 0) {

Callers 1

Calls 1

pipeFunction · 0.50

Tested by

no test coverage detected