expect

infix fun <V, E> Result<V, E>.expect(message: String): V


infix inline fun <V, E> Result<V, E>.expect(message: () -> Any): V

Unwraps a Result, yielding the value.

Parameters

message

The message to include in the UnwrapException if the Result is an Err.

Throws