catch

inline fun <R> catch(f: () -> R): Outcome<Throwable, R>(source)

Catches any exceptions thrown by the function and lifts the result into an Outcome. If your function returns an option use catchOption instead