Details
-
New Feature
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
None
-
None
-
None
Description
Currently, we have no way of signaling to users (or ourselves) that an error has been encountered while iterating a cursor via next(), since that method cannot throw according to the Sequence protocol. In order to determine if an error has occurred, one must check the .error property on the cursor after iteration has completed, which is easy to forget (as evidenced by SWIFT-652 and some user cases).
In order to signal to users than errors have occurred, we could iterate over Result<T> instead of just T, similar to how it is done in the Rust driver.