ChrisJRutter
Member
Hi All
Code that previously trapped the error condition in v8 isn't doing it's job in v9.
The offending code is:
PROCESS-BLOCK:
DO TRANSACTION ON ERROR UNDO, LEAVE:
/* point A */
FOR EACH <blah>:
DO <blah>.
/* point B */
END.
END.
If an error conditon is raised at "point A" then the PROCESS-BLOCK is undone correctly.
If an error conditon is raised during the FOR EACH at "point B" then the PROCESS-BLOCK is not undone and the next record of the FOR EACH is processed.
If I add 'ON ERROR UNDO PROCESS-BLOCK, LEAVE PROCESS-BLOCK' in the FOR EACH statement, it traps errors and works correctly.
I'm sure I didn't need to do this in v8 as the outermost ON ERROR would trap errors in the FOR EACH loop.
Can anyone enlighten me please?
Cheers
Chris
Code that previously trapped the error condition in v8 isn't doing it's job in v9.
The offending code is:
PROCESS-BLOCK:
DO TRANSACTION ON ERROR UNDO, LEAVE:
/* point A */
FOR EACH <blah>:
DO <blah>.
/* point B */
END.
END.
If an error conditon is raised at "point A" then the PROCESS-BLOCK is undone correctly.
If an error conditon is raised during the FOR EACH at "point B" then the PROCESS-BLOCK is not undone and the next record of the FOR EACH is processed.
If I add 'ON ERROR UNDO PROCESS-BLOCK, LEAVE PROCESS-BLOCK' in the FOR EACH statement, it traps errors and works correctly.
I'm sure I didn't need to do this in v8 as the outermost ON ERROR would trap errors in the FOR EACH loop.
Can anyone enlighten me please?
Cheers
Chris