Re: [swift-users] Generators vs. errors

2016-04-13 Thread Brent Royal-Gordon via swift-users
> On Apr 12, 2016, at 11:53 AM, Jens Alfke via swift-users > wrote: > > What should one do, when implementing a Generator, if the underlying data > source can experience errors? Generator.next isn’t allowed to throw, only to > return nil at the end of the sequence. >

Re: [swift-users] Generators vs. errors

2016-04-12 Thread David Sweeris via swift-users
I think I’d either just end the sequence on an error, or do like you were thinking and have a function/computed property that gives an array containing all the rows which had an error or something. I’m not a DB guy, though. - Dave Sweeris > On Apr 12, 2016, at 1:53 PM, Jens Alfke via

[swift-users] Generators vs. errors

2016-04-12 Thread Jens Alfke via swift-users
What should one do, when implementing a Generator, if the underlying data source can experience errors? Generator.next isn’t allowed to throw, only to return nil at the end of the sequence. The only idea I can think of is to add an `error` property to my Generator implementation, and request