On Wednesday, 19 November 2014 at 05:49:55 UTC, H. S. Teoh via Digitalmars-d w
From what I understand, this PR is proposing to add a range wrapper that
catches exceptions thrown from range primitives and passes them to a user-specified handler. Seems to be a promising idea, but it's probably

It is exactly that:

    auto s = "12,1337z32,54,2,7,9,1z,6,8";

    auto r = s.splitter(',')
        .map!(a => to!int(a))
        .handleBack!(ConvException, (e, r) => 0)
        .array;

    assert(equal(h, [12, 0, 54, 2, 7, 9, 0, 6, 8]));


Reply via email to