How do I get a PL/SQL program to end halfway through? I haven't been able to find any way to gracefully end the program if an exception occurs - if I handle it, it loops back into the code.
Basically what I want to do is force the app not to run in certain conditions. So, I want to add something like this to the top of the program:
BEGIN
IF [condition]
EXIT
END IF
[the rest of the program]
END
The suggested way is to throw an exception, but the block may well be an inner block - so the program outside of the block just keeps going.