tryCatch
tryCatch<
E,A>(f,onError):Result<E,A>
Defined in: Core/Result.ts:68
Creates an Result from a function that may throw. Catches any errors and transforms them using the onError function.
Type Parameters
Section titled “Type Parameters”E
A
Parameters
Section titled “Parameters”() => A
onError
Section titled “onError”(e) => E
Returns
Section titled “Returns”Result<E, A>