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

Status
Not open for further replies.
L

Laura Stern

Guest
Sorry, I don't understand what the use case is. Hard to comment on this without knowing what you're trying to do. Do you want a catch block for the first for each, but not the second? If so, then put the catch in the for each block that you want it to pertain to. i.e., B1: for each ttdata ON ERROR UNDO, THROW : for each ttdata2 on error undo, throw : catch e AS Progress.Lang.Error : next b1. end catch. end. /*This will not compile because nothing is allowed after catch statement */ for each ttdata3 no-lock : end. END. You can get it to do whatever you want. If you want both for each statements to be governed by the catch, then move the catch to the outer for each: B1: for each ttdata ON ERROR UNDO, THROW : for each ttdata2 on error undo, throw : ... end. /*This will not compile because nothing is allowed after catch statement */ for each ttdata3 no-lock : end. catch e AS Progress.Lang.Error : next b1. end catch. END. If not one of those, then what are you trying to accomplish?

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