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 2019/01/23 12:59:00 UTC

[jira] [Resolved] (DAFFODIL-1476) Line numbers in error messages off by size of comments above

     [ https://issues.apache.org/jira/browse/DAFFODIL-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Lawrence resolved DAFFODIL-1476.
--------------------------------------
       Resolution: Fixed
    Fix Version/s:     (was: 2.4.0)
                   2.3.0

Fixed in commit 6cfcb15464f4eb61ddae1bb9876c47b610cabb89

> Line numbers in error messages off by size of comments above
> ------------------------------------------------------------
>
>                 Key: DAFFODIL-1476
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1476
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Diagnostics, Front End, Usability
>    Affects Versions: 2.0.0
>            Reporter: Michael Beckerle
>            Assignee: Steve Lawrence
>            Priority: Major
>             Fix For: 2.3.0
>
>
> Steven Williams reports that line numbers are off in diagostic messages, and seemingly by just the size of preceding XML comments in the schema.
> While parsing a data file, a parsing error reports the incorrect line number in the schema.
>  
> [error] Parse Error: Assertion failed. { ../Octet1/APC eq 1 } failed
> Parsed value was: ��� a whole lot of XML���
> Schema context: element.APC Location line 283 column 8 in file:/H:/git/cat062/dfdl/cat062.dfdl.xsd
>  
> Line 283 in the schema is
>  
>     <xs:element name=���FX��� type=���cat062:bool��� />
>  
> The line in the schema containing the test listed in the error message is inside the following xs:element, which starts at line 287 (the test is on line 290).
>  
> Our schema contains a company policy-mandated comment block at the top of the schema, similar to
>  
> <!���
> // ****
> // Company Proprietary
> //
> // Copyright �� 2016
> // Disclaimer
> // ****
> -->
>  
> If I remove that comment block or reduce it to <!-- --> on a single line, the schema line referenced in the error message now correctly points to the start of the element containing the failed test.
>  
> This should also show up on the schemas in github.com/DFDLSchemas as they have much larger multi-line comment blocks that would throw the error line number a lot further off.
>  
> Steve



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