Continous Execution after Exception Handling [message #340475] |
Wed, 13 August 2008 01:24  |
senthil.gts
Messages: 3 Registered: August 2008
|
Junior Member |
|
|
Dear Members,
Kindly help me out in the following scenarion.
In a PL/SQL block, there are 1000 lines.
If any exception is been raised in any of the lines. Then how can i continue the program control from the next line where the exception got raised.
Thanks in advance.
|
|
|
|
Re: Continous Execution after Exception Handling [message #340520 is a reply to message #340482] |
Wed, 13 August 2008 03:08   |
senthil.gts
Messages: 3 Registered: August 2008
|
Junior Member |
|
|
Dear Michel,
As you said i want to ignore all the errors. I just want to know any provision is there in oracle for this requirement.
Also i agree the case which u have discussed, where ignoring errors is of no use.
But, Consider the following scenario
declare
i number;
j number;
k number;
begin
insert into x values ('a'); -- line 1
i := 1; -- line 2
insert into x values ('b'); -- line 3
j := 0; -- line 4
insert into x values ('c'); -- line 5
k := i/j; -- line 6
insert into x values ('d'); -- line 7
end;
Here i want the program control to execute line 7, in fact of the exception in line 6. One solution is, if i make line 6 as separate anonymous block with exception block, then line 7 can be executed. But say if there are n number of lines and any line can cause any error i can't have n number of anonymous blocks, can the program control could travel till the end of the block. Is there any provision for this in oracle.
Kindly suggest.
Thanks,
Senthil
|
|
|
|
|
|