onFailureSuspend

inline suspend fun <T> Result<T>.onFailureSuspend(crossinline action: suspend (exception: Throwable) -> Unit): Result<T>

Author

skydoves (Jaewoong Eum)

Since

1.0.1

Performs the given suspend action on the encapsulated Throwable exception if this instance represents failure. Returns the original Result unchanged.

Parameters

action

Performs on the encapsulated value if this instance represents failure.