DO ON ERROR UNDO, LEAVE:
FIND Customer WHERE CustNum = 1000. /* Raises ERROR and execution goes to CATCH block. */ MESSAGE "This message never appears because of ERROR condition." VIEW-AS ALERT-BOX BUTTONS OK. CATCH eSysError AS Progress.Lang.SysError: /* Handler code for SysError condition */ MESSAGE "Inside CATCH block." VIEW-AS ALERT-BOX BUTTONS OK. /* Execution goes to FINALLY before leaving DO block. */ END CATCH. FINALLY: /* Your code */ MESSAGE "Inside FINALLY block." VIEW-AS ALERT-BOX BUTTONS OK. /* LEAVE DO block here. */ END FINALLY. END. /* DO */ MESSAGE "Out of DO block." VIEW-AS ALERT-BOX BUTTONS OK. |