expectError

inline fun AsyncResult<*>.expectError(crossinline message: () -> Any): Error

Extracts the value from the AsyncResult if it's an Error, otherwise throws an UnwrapException with the computed message in it.