getOrThrow method

  1. @override
S getOrThrow()
override

Get the S value IF it is a Success.

It may throw SuccessResultNotFoundException if this result is actually an Error of E.

Make sure to use isSuccess or if (result case Success()) before accessing this method.

You can also use tryGetSuccess if you're unsure of the possible result.

Implementation

@override
S getOrThrow() => _success;