Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
下面的循环调用了一个执行各种“事情”的过程
如果它应该抛出异常,它也会“引发”它。我想抓住它并忽略它,让循环继续处理数组中的下一个值。
谢谢
WHILE indx IS NOT NULL LOOP table_dump_csv(tableList(indx), tableList(indx) || '.csv'); indx := tableList.NEXT(indx); END LOOP;
一种可能的方法...
WHILE indx IS NOT NULL LOOP BEGIN table_dump_csv(tableList(indx), tableList(indx) || '.csv'); EXCEPTION WHEN OTHERS THEN -- Handle/Ignore the exception as appropriate END; indx := tableList.NEXT(indx); END LOOP;
或者,您可以将过程更改为返回成功/失败代码的函数。