Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2912

Improve error message for addE() when traverser is incorrect

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Done
    • 3.5.5
    • 3.7.0, 3.6.3, 3.5.6
    • process
    • None

    Description

      For this:

      gremlin> g.addV('A').as('a').addE('self').addE('self2').to('a')
      addE(self2) could not find a Vertex for from() - encountered: TinkerEdge
      Type ':help' or ':h' for help.
      Display stack trace? [yN]n
      

      The traverser for the second addE('self2') is not a Vertex` - it is the previously added Edge of addE('self'). Since `from()` is not provided for the second addE('self2') it uses the current traverser and we get the exception shown. The exception is a bit confusing for those who don't realize what it means. Change the exception to: "addE(self2) could not find a Vertex specified for from() - a TinkerEdge was specified instead" - or perhaps a better message?

      Attachments

        Activity

          People

            spmallette Stephen Mallette
            spmallette Stephen Mallette
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: