neo4j/community — pull request #440 by jexp (2012-04-20 23:26:29+00:00)
Title: Fix for cypher-plugin test

The change to a streaming approach caused the exceptions from cypher (due to the lazy nature) only
to occur during the iteration of the result which as too late, so the Exception was not converted
into a BadInputException but Internal Server Error

Change contains a ExceptionHandlingIterable which allows to intercept and convert exceptions thrown
during iterator(), next(), hasNext() and remove().

A custom implementation for REST Representation then converts Exceptions into BadInputExceptions.