suspendCatching

suspend fun <T> suspendCatching(catchTimeout: Boolean = false, block: suspend CoroutineScope.() -> T): Result<T>(source)

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