Continue iteration after exception

Dmitry Olshansky dmitry.olsh at gmail.com
Wed Jan 23 10:19:19 PST 2013


23-Jan-2013 20:09, H. S. Teoh пишет:
> On Wed, Jan 23, 2013 at 04:52:25PM +0100, monarch_dodra wrote:
>> 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.
>
> This may not be possible if DirEntries is implemented with opApply
> instead of a range.

It's a range.

TL;DR :)

-- 
Dmitry Olshansky


More information about the Digitalmars-d-learn mailing list