You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Marko A. Rodriguez (JIRA)" <ji...@apache.org> on 2016/09/15 15:52:21 UTC

[jira] [Commented] (TINKERPOP-1450) Add support for stack trace filling to FastNoSuchElementException

    [ https://issues.apache.org/jira/browse/TINKERPOP-1450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15493732#comment-15493732 ] 

Marko A. Rodriguez commented on TINKERPOP-1450:
-----------------------------------------------

The "is.testing" model is trivial to implement.

{code}
    private final static boolean isTesting = Boolean.valueOf(System.getProperty("is.testing","false"))

    @Override
    public synchronized Throwable fillInStackTrace() {
        return isTesting ? super.fillStackTrace() : this;
    }
{code}

> Add support for stack trace filling to FastNoSuchElementException
> -----------------------------------------------------------------
>
>                 Key: TINKERPOP-1450
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1450
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.1.3, 3.2.2
>            Reporter: Marko A. Rodriguez
>
> Many people (like [~mbroecheler]) complain that if they have some complicated code they don't know where the problem is when a traversal throws a {{FastNoSuchElementException}}. I think we can remedy this in on of two ways:
> 1.) Only the root traversal will "fill in the stack trace" if there is no such element. This way, a stack trace is filled once and only once. However, the problem here is that the user will only know that the traversal failed, not where in the traversal it failed.
> 2.) Provide a "is.testing" System.getProperty() to {{FastNoSuchElementException}}. The problem here, this will only show stack traces for code that is executed in the same JVM as Gremlin's. This is great for actually testing (JUnit style), but not for production settings.
> 3.) ... dunno? Anyone have an idea?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)