1

下面的循环调用了一个执行各种“事情”的过程

如果它应该抛出异常,它也会“引发”它。我想抓住它并忽略它,让循环继续处理数组中的下一个值。

谢谢

WHILE indx IS NOT NULL LOOP

    table_dump_csv(tableList(indx), tableList(indx) || '.csv');

    indx := tableList.NEXT(indx);
END LOOP;
4

1 回答 1

2

一种可能的方法...

   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;

或者,您可以将过程更改为返回成功/失败代码的函数。

于 2008-11-27T12:41:07.863 回答