tryCatch<T, E = Error>(fn: () => T): Result<T, E>
Wrap a function with try-catch and return a Result.
Wrap a function with try-catch and return a Result.