title: <<SQL_ERROR>> block
body: <p>In our Stored procedures we have the following code towards the very end. </p>
  
  <pre><code>  &lt;&lt;SQL_ERROR&gt;&gt;
    V_SYS_ERROR_MSG := SUBSTR(SQLERRM, 1, 252);
  
    DBMS_OUTPUT.PUT_LINE('ERROR IN EXECUTION IN PROCEDURE');
  
    DBMS_OUTPUT.PUT_LINE('THE ERROR CODE IS ' || V_SYS_ERROR || '- ' ||
                         V_SYS_ERROR_MSG);
  </code></pre>
  
  <p>we have statements like following which call the error block. </p>
  
  <pre><code>  IF V_SYS_ERROR &lt;&gt; 0 THEN
      GOTO SQL_ERROR;
  </code></pre>
  
  <p>the DBMS output statements come even when there is no error. How can we avoid this?</p>