dschuchman
New Member
would like to know how to catch run-time errors.
have the following code(error.p) which exceeds array bounds:
/* error.p */
DEFINE VARIABLE v-array AS INTEGER EXTENT 10.
DEFINE VARIABLE v-i AS INTEGER.
DO v-i = 1 TO 11 ON ERROR UNDO, LEAVE:
v-array[v-i] = v-i.
END.
i go into editor and run the following:
RUN VALUE("error.p") NO-ERROR.
IF ERROR-STATUS:ERROR THEN DO:
DISPLAY "Have error".
END.
the "Have error" does not show up. any ideas how i can catch run-time errors like this occuring?
have the following code(error.p) which exceeds array bounds:
/* error.p */
DEFINE VARIABLE v-array AS INTEGER EXTENT 10.
DEFINE VARIABLE v-i AS INTEGER.
DO v-i = 1 TO 11 ON ERROR UNDO, LEAVE:
v-array[v-i] = v-i.
END.
i go into editor and run the following:
RUN VALUE("error.p") NO-ERROR.
IF ERROR-STATUS:ERROR THEN DO:
DISPLAY "Have error".
END.
the "Have error" does not show up. any ideas how i can catch run-time errors like this occuring?