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

Mike Beckerle commented on DAFFODIL-2686:
-----------------------------------------

See email [https://lists.apache.org/thread/7psvgw5zvp6j0w8072npsrh8frczrfqq]

The diagnostic message should probably say: "If this left-over data indicates 
an error, consider adding discriminators to the DFDL schema to improve its 
diagnostic behavior."

> left over data message diagnostic not clear enough
> --------------------------------------------------
>
>                 Key: DAFFODIL-2686
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2686
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Diagnostics
>    Affects Versions: 3.3.0
>            Reporter: Mike Beckerle
>            Priority: Major
>             Fix For: 3.4.0
>
>
> Daffodil's diagnostic message on left-over-data is inadequate. 
> When a user gets this message about left-over data, nothing mentions that
>  * the parse ended normally
>  * An infoset was created (nor is this infoset or any representation of it 
> shown)
> Furthermore, the message provided mentions offsets in bits, without giving a 
> translation of those into units of bytes. (Even if divisible by 8). 
> This diagnostic needs improvement. 
> Furthermore, when this diagnostic is issued, it needs to suggest what stopped 
> processing.  This may require a breadcrumb of why a repeating structure ended 
> - e.g., if occursCountKind is parsed or implicit, that it a parse failure 
> ended the array. 
> I'm thinking a finite depth stack of parse errors needs to be maintained so 
> that after a final failure that is resolved by terminating an array, that the 
> prior diagnostic message (the one suppressed by the recurring element's 
> termination), can have access to the most recent few processing errors. (By 
> finite stack, I mean if the stack is full and you try to push, the bottom 
> element of the stack is removed to make room for another top element)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to