onFailure

Common
JVM
JS
Native
1.3
inline fun <T> Result<T>.onFailure(
    action: (exception: Throwable) -> Unit
): Result<T>

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