title: Abort a PL/SQL program
body: <p>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.</p>
  
  <p>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:</p>
  
  <pre><code>BEGIN
      IF [condition]
          EXIT
      END IF
      [the rest of the program]
  END
  </code></pre>
  
  <p>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.</p>