Forum Post: RE: On error .. throw: Catch... missing precious info.

  • Thread starter Thread starter OctavioOlguin
  • Start date Start date
Status
Not open for further replies.
O

OctavioOlguin

Guest
After all, I ended with this testing procedure, hope they serve to someone starting to learning like me: ----- Main procedure file: BLOCK-LEVEL ON ERROR UNDO, THROW. DO ON ERROR UNDO, THROW: RUN runWithError. MESSAGE "No error" VIEW-AS ALERT-BOX. END. CATCH myE AS Progress.Lang.SysError: MESSAGE "Catched that Sys error..." VIEW-AS ALERT-BOX. END CATCH. CATCH myA AS Progress.Lang.AppError: MESSAGE "Catched that App error..." SKIP "Retrurn value: " myA:returnvalue VIEW-AS ALERT-BOX. END CATCH. /*end of Main Block */ PROCEDURE runWithError. DEFINE VARIABLE foo AS CHAR NO-UNDO. DO ON STOP UNDO, RETURN ERROR NEW Progress.Lang.AppError("AppError generated msg", 0): MESSAGE "Do you want a SysError, AppError or No error at All (yes,no,cancel, respectivelly)" VIEW-AS ALERT-BOX BUTTONS YES-NO-CANCEL UPDATE resp AS LOGICAL. IF resp THEN RUN nofile.p. ELSE IF NOT resp THEN DO: foo = STRING(999, " "). END. ELSE RETURN. END. END. Greetings

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