solidCatching

inline fun <T> solidCatching(block: () -> T): SolidResult<T>

Runs block, returning its value as SolidResult.Success or mapping a thrown exception to SolidResult.Failure via SolidError.fromThrowable. A kotlinx.coroutines.CancellationException (recognized by class name so this has no coroutines dependency) is rethrown so cancellation is never swallowed.