ORA-20001, ORA-06512: at line 59 ORA-06512 exception error
<p>Here is part of my PL/SQL block where I define an exception. It runs okay when my data does not contain any exceptions but generate the error message when there are exceptions. The error message is as follows:"ORA-20001: Invalid score change.
ORA-06512: at line 59
ORA-06512: at line 73"</p>

<p>I am wondering what went wrong with it. Can anyone help me out here? Thanks.</p>

<pre><code>begin

   if (newpoints&lt;0 or newpoints&gt;maximumpoints) then 
            raise invalid_score_change;
         end if; 
exception 
      when invalid_score_change then
         raise_application_error(-20001,'Invalid score change.');
end;
</code></pre>