D-Programming-Language/phobos — pull request #2724 by burner (2014-11-14 22:56:46+00:00)
Title: Rangeexception front

When an Exception is thrown by a Range the execution of the Range is usually aborted.
This PR add two functions:

* handleFront
* handlePopFront

that wrap a Range and call the functions front and popFront of the wrapped Range. If the wrapped Range throws an Exception an user provided handler is called. This handler gets the Range and the Exception passed and can then be used to handle the Exception and put the Range in an workable state again.

Additional PRs will add handler Ranges for back|popBack, empty and opIndex