Fixed #22879 -- Intercept errors coming from cursor.__next__()