title: How do I exit a script in SQLPlus when an error occurs and return to the SQLPlus prompt, without disconnecting or exiting SQLPlus?
body: <p>I have some scripts that get run often, always from within a connected SQLPlus session.</p>
  
  <p>I need a way to exit the script when an error occurs, <em>without</em> disconnecting or exiting SQLPlus itself.  100% of the time, when an error occurs, the connected DBA will need to issue one or more commands into the session.  100% of the time, when an error occurs, there are other SQLPlus statements (and thus <em>must</em> be <em>outside</em> of a <code>BEGIN..END;</code>) later on in the script that <em>must not</em> be executed or serious problems could arise.</p>
  
  <p>NOTE:  If you suggest <code>WHENEVER SQLERROR EXIT</code> then you didn't read the above text.  That will disconnect and exit SQLPlus <em>in addition to</em> the script, which is not acceptable behavior.</p>