unwrapErr method

Future<E> unwrapErr()

Unwraps a result, yielding the content of an Err.

Throws an exception if the value is an Ok, with a custom message provided by calling toString() on the Ok's value.

Implementation

Future<E> unwrapErr() => then((result) => result.unwrapErr());