Kbase P104147: REPEAT loop is exiting unexpectedly at an UNDO statement
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  29/06/2010 |
|
Status: Unverified
SYMPTOM(s):
REPEAT loop is exiting unexpectedly
REPEAT loop contains an UNDO statement
UNDO statement is executed in two consecutive passes of the REPEAT loop
REPEAT loop does not contain references to the RETRY function
REPEAT loop does not contain statements that block for user input
FACT(s) (Environment):
Progress/OpenEdge Product Family
All Supported Operating Systems
CAUSE:
This is expected behavior.
In particular, this is the Infinite Loop Protection mechanism, documented in the Programming Handbook. For your convenience, here is a quote:
If a statement within a block forces an undo and retry of the block, an infinite loop is possible.
That is, it is possible that whatever caused the block to be undone and retried the first time (whether it is a condition such as ERROR or an explicit UNDO statement), may recur during the retry. If Progress detects that such an infinite loop would occur, then it does not retry the block. Instead it performs the NEXT iteration of a FOR EACH block or iterating DO block; it performs a LEAVE on a REPEAT block, procedure block, trigger block, or non-iterating DO block.
Progress detects that an infinite loop would occur if the following conditions are true:
- The block does not reference any statements that block for user input (such as the UPDATE or WAIT?FOR statements) before the error occurs.
- The block does not reference the RETRY function before the error occurs.
FIX:
Please apply the solutions described in the Programming Handbook, Chapter 5 "Condition Handling and Messages", Section 5.2.1 "Infinite Loop Protection"