errorOrThrow

inline fun <T> Event<T>.errorOrThrow(): Throwable(source)

Returns the encapsulated error if this Event is an Event.Error. Otherwise, throws a NoSuchElementException.