Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Error handling

Error handling

From: <devjnr_at_gmail.com>
Date: 15 Sep 2006 07:00:27 -0700
Message-ID: <1158328827.245691.277510@m73g2000cwd.googlegroups.com>


I'm trying to handle exception inside a loop, but I should continue with the loop after handle the exception:



declare
       excTest    exception;
       lvIdx      pls_integer;

begin

     lvIdx := 5;

     while (lvIdx < 10)
     loop

       dbms_output.put_line(lvIdx);
       raise excTest;
       lvIdx := lvIdx + 1;

     end loop;

     exception

              when excTest then

                   begin
                        dbms_output.put_line('1) exception');
                   end;

              when others then

                   begin
                        dbms_output.put_line('2) unhandled exception');
                   end;

end;


The problem is that I would loop until "lvIdx" is < 10....

I think it should be possible....or not?

Thx. Received on Fri Sep 15 2006 - 09:00:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US