stevedlawrence commented on a change in pull request #757:
URL: https://github.com/apache/daffodil/pull/757#discussion_r809318641



##########
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:
       Is this part correct?
   ```scala
   srd.groupMembers(srd.position-1))
   ```
   Isn't `srd.position` the position of this sequence in its list of siblings, 
and not the position of the array that we want to print?
   
   I'm not sure this function has the information to know which is the right 
child of the sequence that failed to make progress. I *think* the caller of 
`checkForwardProgress` has that information though. Maybe something like 
`parser.erd`, since `parser` in that context is the thing that actually parsed 
an array element but failed to make progress?




-- 
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]


Reply via email to