mapFailure

inline fun <N : Throwable, T> Result<T>.mapFailure(f: (exception: Throwable) -> N): Result<T>(source)

If a Result is a failure, maps the underlying Throwable to a new Throwable.