You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Steve Lawrence (JIRA)" <ji...@apache.org> on 2018/04/30 15:53:00 UTC

[jira] [Commented] (DAFFODIL-1931) Debug/trace - prints spurious error message about ".."

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

Steve Lawrence commented on DAFFODIL-1931:
------------------------------------------

This behavior doesn't seem entirely wrong to me. If one wasn't running in trace mode and was just using the debugger and ran 'eval ..', or really any expression that results in an invalid path, I would expect to see that error.

Perhaps instead of using 'eval ..' in trace mode, we could modify the 'info infoset' command to have an optional argument that specifies how many parent elements of the current element to display, rather than displaying the whole infoset. For example 'info infoset 0' show the current infoset element (i.e show zero parents), 'info infoset 1' would show the parent, 'info infoset 2' would show the grand parent, etc. And 'info infoset -1' would show the entire infoset tree, which would be the default if the third argument was not provided, maintaining the current behavior. And since this number would be a maximum number of parents, if there were not that many parent elements, it would just show the whole tree, avoiding the issue of going past root and getting an error.

> Debug/trace - prints spurious error message about ".."
> ------------------------------------------------------
>
>                 Key: DAFFODIL-1931
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1931
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Debugger
>    Affects Versions: 2.1.0
>            Reporter: Michael Beckerle
>            Priority: Major
>             Fix For: 2.2.0
>
>
> Whenever I use debug/trace now, every step I see:
> {code}
> Debugger error: expression evaluation failed: Schema Definition Error: Relative path '..' past root element.
> Schema context: element reference ex:e1 Location line 1 in file:/tmp/anon5232752542024144234.dfdl.xsd
> {code}
> This is due to the debugger/trace own internal use of ".." in a path evaluation in order to display the infoset I believe. Any step where there is no current infoset element gets this error.
> At one time there was code to specifically catch this and suppress it, but code changes must have modified the thrown exception in a way that now bypasses the logic that suppressed this. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)