suspendRunCatching

inline suspend fun <T> suspendRunCatching(crossinline block: suspend () -> T): Result<T>

Runs the specified block and returns the result as a Result.

Return

The result of the block.

Parameters

block

The block to execute.