Get the Ok value or throw an error if it's Err.
Ok<T, E> get ok { try { return this as Ok<T, E>; } catch (e) { throw Exception('Attempted to get Ok from Err: $e'); } }