err property

Err<T, E> get err

Get the Err value or throw an error if it's Ok.

Implementation

Err<T, E> get err {
  try {
    return this as Err<T, E>;
  } catch (e) {
    throw Exception('Attempted to get Err from Ok: $e');
  }
}