mapFailure

inline fun <T> KotlinResult<T>.mapFailure(onFailure: (Throwable) -> Throwable): KotlinResult<T>

Transform exception into some other Throwable.

Note, this function rethrows any Throwable exception thrown by the onFailure function.