Re: Error handling
- From: DA Morgan <damorgan@xxxxxxxxx>
- Date: Fri, 15 Sep 2006 07:14:53 -0700
devjnr@xxxxxxxxx wrote:
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.
BEGIN
LOOP
BEGIN
--processing here
EXCEPTION
WHEN ....
-- handle exception here
END
END LOOP
END;
HTH
--
Puget Sound Oracle Users Group
.
- References:
- Error handling
- From: devjnr
- Error handling
- Prev by Date: Re: Suppress SQL
- Next by Date: Re: Oracle Benchmark Results for Different Hardware Configurations?
- Previous by thread: Error handling
- Next by thread: Re: Error handling
- Index(es):
Relevant Pages
|