2011/1/5 Anders Nawroth <[email protected]> > Hi! > > > I just tried it and my exceptions thrown from an Evaluator gets propagated >> correctly: >> > > Strange, the test case I wrote yesterday now propagates the exceptions. > Sorry about that part. > > > I just don't like having to take care of the start position special case >>> in each evaluator - is there any nice way I can avoid this? >>> >>> >> I see your point, but if there are multiple evaluators they will be >> invoked >> up until both PRUNE _and_ EXCLUDE have been returned. Then it can be >> certain >> that it doesn't need to ask any other evaluator. Up until then evaluators >> have to be invoked. >> > > OK, so what confused me was that Evaluators.excludeStartPosition() excludes > the start position from the result and not from further evaluation. Maybe > some note could be added to the javadocs to clarify what you need to take > care of when moving from filters to evaluators? >
Yeah, that could be useful... then on the other hand, the start position could perhaps be handled separately in that the traverser will stop asking other evaluators if it has gotten EXCLUDE from one evaluator (PRUNEing the start node is just ridiculous). It may be a good thing since excluding the start node is such a common scenario and getting rid of that lastRelationship()==null (or position.depth()==0) check in every single evaluator you write is a good thing. I'll look into it. > > /anders > -- Mattias Persson, [[email protected]] Hacker, Neo Technology www.neotechnology.com _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

