exceptionOrDefault

inline fun <T> KotlinResult<T>.exceptionOrDefault(defaultError: Throwable): Throwable

Returns the encapsulated Throwable if failure, or defaultError if success.

See also