orThrow

inline fun <T : Any> T?.orThrow(exception: () -> Throwable): T(source)


@JvmName(name = "orThrowNotNull")
inline fun <T : Any> T.orThrow(exception: () -> Throwable): T(source)

Deprecated (with error)

orThrow() on a non-null T is redundant

Replace with

this