[Progress Communities] [Progress OpenEdge ABL] Forum Post: 11.7(win): Traditional error handling: ON ERROR and error in a (write) trigger

Status
Not open for further replies.
S

Stefan Marquardt

Guest
Hello, triggers works fine but I wanted to test what happens in case of errors. I defined a .p as a write trigger of a table (without CRC) Within this trigger i added two lines TRIGGER PROCEDURE FOR WRITE OF... APPLY "Error". My little test in the procedure editor: FIND FIRST ... EXCLUSIVE-LOCK. DISPLAY ... // Display a field DO ON ERROR UNDO, RETRY ON STOP UNDO, RETRY ON QUIT UNDO, RETRY: IF RETRY THEN DO: MESSAGE "error" VIEW-AS ALERT-BOX INFORMATION BUTTONS OK. RETURN. END. ... = "A". // Update a field //VALIDATE ... MESSAGE "All fine". END. The trigger undo the transaction (no update occurs, field doesn't get A) but ON ERROR doesn't react and "All Fine" is displayed. Validate fires the trigger directly and ON ERROR works What is the trick, that the code will be notified about the UNDO with the old On ERROR style?

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