sdk-common / com.tomtom.online.sdk.common.functional / Try / ifFailure

ifFailure

abstract fun ifFailure(@NonNull action: Consumer1<Throwable!>): Try<T>!

Performs the provided action if the Try represents a failure. Note: If action throws, then this method may throw an Exception.

Parameters

action - Consumer1<Throwable!>: A side-effect action to performs.

Return
Try<T>!: new composed Try.