jmac13
Member
Hi All,
I'm using open edge 10.2b I cant seem to throw errors.. can someone point out what im doing wrong. (this code is just a test) I've got a repeat look and i run test which is procedure within my .w which has a catch in for a find first that will fail and it should then throw it up to catch that ive got within my repeat loop but this doesnt seem to happen.
I'm using open edge 10.2b I cant seem to throw errors.. can someone point out what im doing wrong. (this code is just a test) I've got a repeat look and i run test which is procedure within my .w which has a catch in for a find first that will fail and it should then throw it up to catch that ive got within my repeat loop but this doesnt seem to happen.
Code:
do on error undo, leave on stop undo, leave:
repeat:
run test.
catch ErrMessage AS Progress.Lang.ProError:
message "Error Happened"
view-as alert-box information
buttons ok.
message ErrMessage:GetMessage(1) view-as alert-box buttons ok.
end catch.
end.
end.
/*Test procdure*/
PROCEDURE test :
DO ON ERROR UNDO, LEAVE:
FIND grades where grades.grade = "ASDSADSAD".
catch e AS Progress.Lang.ProError:
UNDO, THROW e.
END CATCH.
END.
END PROCEDURE.