Function
try_
(options: {
try: LazyArg<A>
catch: (error: unknown) => E
})
Source from the content-addressed store, hash-verified
| 1018 | } |
| 1019 | |
| 1020 | const try_ = <A, E>(options: { |
| 1021 | try: LazyArg<A> |
| 1022 | catch: (error: unknown) => E |
| 1023 | }): Micro<A, E> => |
| 1024 | suspend(() => { |
| 1025 | try { |
| 1026 | return succeed(options.try()) |
| 1027 | } catch (err) { |
| 1028 | return fail(options.catch(err)) |
| 1029 | } |
| 1030 | }) |
| 1031 | export { |
| 1032 | /** |
| 1033 | * The `Micro` equivalent of a try / catch block, which allows you to map |
Callers
nothing calls this directly
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…