divijvaidya commented on a change in pull request #1553:
URL: https://github.com/apache/tinkerpop/pull/1553#discussion_r794458616
##########
File path:
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/AndStep.java
##########
@@ -33,10 +34,18 @@ public AndStep(final Traversal.Admin traversal, final
Traversal<S, ?>... travers
@Override
protected boolean filter(final Traverser.Admin<S> traverser) {
+ GremlinTypeErrorException typeError = null;
for (final Traversal.Admin<S, ?> traversal : this.traversals) {
- if (!TraversalUtil.test(traverser, traversal))
- return false;
+ try {
+ if (!TraversalUtil.test(traverser, traversal))
+ return false;
+ } catch (GremlinTypeErrorException ex) {
+ // hold onto it until the end in case any other arguments
evaluate to FALSE
Review comment:
I did not understand this. why not short circuit here? (given that the
exception is converted to false anyways and the expression will always be false
irrespective of the result of other traversals.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]