Ranges and Exception handling PR 2724
Robert burner Schadek via Digitalmars-d
digitalmars-d at puremagic.com
Fri Nov 21 06:35:23 PST 2014
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.
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?
More information about the Digitalmars-d
mailing list