DB version: 19c
I am bit of a basic user on PL/SQL.
I wrote a loop like below.
My requirement
If any of the commands (dbms_aqadm.<procedures> shown below) within the loop fails, I want that error/errors to be printed (raised) but I still want the loop to continue iterating (don't exit) until all the records in the cursor is iterated through.
begin
for rec in (select owner,name, queue_table from dba_queues where owner = 'QSCHEMA03') 
loop
	begin
  	dbms_aqadm.stop_queue(queue_name => rec.owner||'.'||rec.name);
  	dbms_aqadm.drop_queue(queue_name => rec.owner||'.'||rec.name);
  	dbms_aqadm.drop_queue_table(queue_table => rec.owner||'.'||rec.queue_table, force=>true);
  	
  	exception when others then
       	raise;
	end;
end loop;
end;
/
Can the exception block
exception when others then
       raise;
achieve it ? This is what I am currently using in my loop.
I know
exception when others then
       null;
can do it. But, this will mask the errors.
I want the errors to be printed (raised) but loop should continue until all the records in the cursor is iterated.