You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by okram <gi...@git.apache.org> on 2017/09/11 17:58:20 UTC

[GitHub] tinkerpop pull request #711: TINKERPOP-1746: Better error message on wrong o...

GitHub user okram opened a pull request:

    https://github.com/apache/tinkerpop/pull/711

    TINKERPOP-1746: Better error message on wrong ordering of emit()/until()/has()

    Simply added a proper error message when `repeatTraversal` is null. This provides a better user experience than `NullPointerException`.
    
    VOTE +1

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/tinkerpop TINKERPOP-1746

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tinkerpop/pull/711.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #711
    
----
commit b28701f7c660c87b05edee3404a66c2fb3671089
Author: Marko A. Rodriguez <ok...@gmail.com>
Date:   2017-09-11T17:56:20Z

    added better error message for RepeatStep usage errors.

----


---

[GitHub] tinkerpop pull request #711: TINKERPOP-1746: Better error message on wrong o...

Posted by dkuppitz <gi...@git.apache.org>.
Github user dkuppitz commented on a diff in the pull request:

    https://github.com/apache/tinkerpop/pull/711#discussion_r138436841
  
    --- Diff: gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java ---
    @@ -91,6 +91,8 @@ public void setEmitTraversal(final Traversal.Admin<S, ?> emitTraversal) {
         }
     
         public Traversal.Admin<S, S> getRepeatTraversal() {
    +        if(null == this.repeatTraversal)
    +            throw new IllegalStateException("The repeat()-traversal was not defined: " + this);
    --- End diff --
    
    I wouldn't throw an exception in a Getter.


---

[GitHub] tinkerpop issue #711: TINKERPOP-1746: Better error message on wrong ordering...

Posted by spmallette <gi...@git.apache.org>.
Github user spmallette commented on the issue:

    https://github.com/apache/tinkerpop/pull/711
  
    All tests pass with `docker/build.sh -t -n -i`
    
    VOTE +1


---

[GitHub] tinkerpop issue #711: TINKERPOP-1746: Better error message on wrong ordering...

Posted by dkuppitz <gi...@git.apache.org>.
Github user dkuppitz commented on the issue:

    https://github.com/apache/tinkerpop/pull/711
  
    Nvm, I just saw the ticket description (link is missing here and I was too lazy to look it up).
    
    VOTE: +1


---

[GitHub] tinkerpop issue #711: TINKERPOP-1746: Better error message on wrong ordering...

Posted by dkuppitz <gi...@git.apache.org>.
Github user dkuppitz commented on the issue:

    https://github.com/apache/tinkerpop/pull/711
  
    Which scenario would end up throwing this exception? Tried this:
    
    ```
    gremlin> g = TinkerFactory.createModern().traversal()
    ==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
    gremlin> g.V().repeat().times(2)
    java.lang.NullPointerException
    ```
    
    ... but it's obviously still a NPE thrown in [line 67](https://github.com/apache/tinkerpop/blob/53db262511e9d84b1262522fc841ded825df4fc6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java#L67).


---

[GitHub] tinkerpop pull request #711: TINKERPOP-1746: Better error message on wrong o...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/tinkerpop/pull/711


---