[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Structured Error Handling

Status
Not open for further replies.
F

frank.meulblok

Guest
- Using a FINALLY block should not be considered here. Those are meant for cleanup, not for functional logic. - As ssouthwe pointed out, you can always use another block to handle the scope of your error handling.opt to - If you want your code to proceed with the next child, your catch should not contain statements that tell it to proceed with the next parent. This should be close to what you're after: DEFINE TEMP-TABLE ttdata NO-UNDo FIELD F1 AS CHAR. DEFINE TEMP-TABLE ttdata2 NO-UNDo FIELD F2 AS CHAR. DEFINE TEMP-TABLE ttdata3 NO-UNDo FIELD F2 AS CHAR. CREATE ttdata. CREATE ttdata2. CREATE ttdata3. B1: for each ttdata ON ERROR UNDO, THROW : MESSAGE "found parent". DO ON ERROR UNDO, THROW: for each ttdata2 on error undo, throw : MESSAGE "found ttdata2". MESSAGE DATE("20/20/2020"). /* make an error happen */ end. CATCH e AS Progress.Lang.Error : /*next b1.*/ END catch. END. for each ttdata3 no-lock : MESSAGE "found ttdata3". end. END. CATCH e AS Progress.Lang.Error : END CATCH.

Continue reading...
 
Status
Not open for further replies.
Top