( self: Effect.Effect<A, E, R> )
| 2572 | |
| 2573 | /** @internal */ |
| 2574 | export const catchNoSuchElement = <A, E, R>( |
| 2575 | self: Effect.Effect<A, E, R> |
| 2576 | ): Effect.Effect<Option.Option<A>, Exclude<E, Cause.NoSuchElementError>, R> => |
| 2577 | matchEffect(self, { |
| 2578 | onFailure: (error) => |
| 2579 | isNoSuchElementError(error) |
| 2580 | ? succeedNone |
| 2581 | : fail(error as Exclude<E, Cause.NoSuchElementError>), |
| 2582 | onSuccess: succeedSome |
| 2583 | }) |
| 2584 | |
| 2585 | /** @internal */ |
| 2586 | export const catchDefect: { |
nothing calls this directly
no test coverage detected