stevedlawrence commented on a change in pull request #757:
URL: https://github.com/apache/daffodil/pull/757#discussion_r809322369
##########
File path:
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/SequenceParserBases.scala
##########
@@ -62,7 +62,7 @@ abstract class SequenceParserBase(
ais: ArrayIndexStatus): ArrayIndexStatus = {
Assert.invariant(currentPos >= priorPos)
if (currentPos == priorPos && pstate.groupPos > 1) {
- PE(pstate, "No forward progress.")
+ PE(pstate, "Error parsing array '%s': Array element parsed succesfully,
but consumed no data and is stuck in an infinite loop as it is
unbounded.".format(srd.groupMembers(srd.position-1)))
Review comment:
If the above is correct (I'm still not totally sure), maybe what we
really want is to pass in `parser`, and then call `parser.PE(...)`. That way
the context of the PE would be on that of the array parser and not of the
sequence. And with the right context, you might not even need to include the
array name in the error message since it should be included in the context?
If that's true, it might be worth adding the array name to the
`<tdml:error>` so that we make sure we get the expected context.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]