On Wednesday, 23 January 2013 at 15:24:02 UTC, Josh wrote:
On Wednesday, 23 January 2013 at 15:00:16 UTC, bearophile wrote:
A possible solution: desugar the foreach range iteration protocol of dirEntries and wrap the relevant method with a try-catch.

Sorry, could you explain that a little? I'm not sure what desugar means :/

He means you turn it into a normal loop with !empty, front and popFront.

That wouldn't really work anyways. Why you'd be able to catch the exception when calling popFront, and preserve your iteration state, you'd be unable to iterate past the exception point :/

Reply via email to