scopeCatching

fun <T> scopeCatching(catchTimeout: Boolean = false, block: () -> T): Result<T>(source)

Equivalent of runCatching but able to throw CancellationException to cancel parent jobs.