checkSuccess

fun <S, F> Try<S, F>.checkSuccess(): S

Returns value in case of success and throws an IllegalStateException in case of failure.