expect method

  1. @override
T expect(
  1. String msg
)
override

Unwraps a result, yielding the content of an Ok.

Throws an Exception if the value is an Err, with the passed message.

Implementation

@override
T expect(String msg) {
  throw ResultUnwrapException<T, E>(msg);
}