12.1.0.2
Is it possible to generate an exception in a loop but continue? Note the wording, I want the error raised, not handled.
Example: I want 10 errors raised in below code but we only get 1, the first 1 as expected, and then the code exits. If I add an exception clause, I can set to continue on error but the error isnt really raised then.
declare
v_chr varchar(10);
begin
dbms_output.put_line('Start :' || to_char(systimestamp, 'HH24:MI:SS.FF6'));
for i in 1..10
loop
select to_number('a') into v_chr from dual;
end loop;
dbms_output.put_line('End :' || to_char(systimestamp, 'HH24:MI:SS.FF6'));
end;
Is it possible? Logging the errors to a table in the exception clause is not what Im looking for. an ORA- error has to be raised.