[
https://issues.apache.org/jira/browse/DAFFODIL-2356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17170370#comment-17170370
]
Mike Beckerle commented on DAFFODIL-2356:
-----------------------------------------
Makes sense to me that the construction of another enclosing PE should see that
the cause is already a PE, and not create a new one.
This will change diagnostic behavior, and some negative tests probably will
have to be adjusted.
> Confusing diagnostic with a PE is the cause of another PE
> ---------------------------------------------------------
>
> Key: DAFFODIL-2356
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2356
> Project: Daffodil
> Issue Type: Bug
> Components: Diagnostics
> Reporter: Steve Lawrence
> Priority: Major
>
> When delimiter scanning fails to find a delimiter, it creates a PE that is
> something like "Separator foo not found". The SeparatorParseHelper will
> checked for failures and create a new PE that's something like "Failed to
> parse infix separator", providing the first as a cause. This can be confusing
> because both the new PE and the cause PE include context information.
> Furthurmore, the cause PE is also a separate diagnostic, so it too is
> printed. So the output of such a failure looks something like:
> {code}
> Parse Error: Failed to parse infix separator. Cause: Separator foo not found
> Schema Context: context for cause PE
> Schema Context: context for new PE
> ParseError: Separator foo not found
> Schema Context: context for cause PE
> {code}
> This nesting of contexs and duplciate PE makes for a very confusing and
> unclear diagnostic.
> Perhaps we shouldn't include PE as a cause for other PE's to avoid this
> nesting, especially considering the cause PE will already be output as a
> diagnostic?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)