DO ON ERROR UNDO, LEAVE:
FIND Customer 1000. /* Raises ERROR and execution goes to the 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. */ UNDO, THROW eSysError. END CATCH. FINALLY: /* Your code */ MESSAGE "Inside FINALLY block." VIEW-AS ALERT-BOX BUTTONS OK. END FINALLY. END. /* DO */ CATCH eSysError AS Progress.Lang.SysError: MESSAGE "Out of DO block and inside CATCH block for procedure block" VIEW-AS ALERT-BOX BUTTONS OK. END CATCH. |