Back to your problem: If you do the foreach by hand, can you place the part that throws (popFront, front or empty) in an try catch block and still iterate to the next element afterwards?
Re: Ranges and Exception handling PR 2724
Robert burner Schadek via Digitalmars-d Fri, 21 Nov 2014 06:42:08 -0800
Your idea designs an idiom on how to let ranges handle
exceptions. My PR is about how to handle exceptions thrown by
ranges. Both sort-of do the same thing but at different points.
Your design idiom needs source access (needs to be programmed
in). Mine can be bolted on later (an additional element in the
range chain). Of course fixing an erroneous range might be tricky
but than exception handling and recovering is not easy to being
with.
- Ranges and Exception handling PR 2... Robert burner Schadek via Digitalmars-d
- Re: Ranges and Exception hand... H. S. Teoh via Digitalmars-d
- Re: Ranges and Exception hand... Robert burner Schadek via Digitalmars-d
- Re: Ranges and Exception ... H. S. Teoh via Digitalmars-d
- Re: Ranges and Exception ... bearophile via Digitalmars-d
- Re: Ranges and Except... Robert burner Schadek via Digitalmars-d
- Re: Ranges and Exception hand... Sean Kelly via Digitalmars-d
- Re: Ranges and Exception hand... Jonathan Marler via Digitalmars-d
- Re: Ranges and Exception ... Robert burner Schadek via Digitalmars-d
- Re: Ranges and Exception ... Marco Leise via Digitalmars-d
- Re: Ranges and Except... Jonathan Marler via Digitalmars-d
- Re: Ranges and Ex... Jonathan Marler via Digitalmars-d
- Re: Ranges and Exception hand... Robert burner Schadek via Digitalmars-d
- Re: Ranges and Exception ... Tobias Pankrath via Digitalmars-d
- Re: Ranges and Except... Mike Parker via Digitalmars-d