title: How to catch an error into forall plsql
body: <p>I put this exception to avoid any error inserting some row but I don't know why I can run.</p>
  
  <pre><code>DECLARE
  TYPE dataDate IS TABLE OF DATE;
  l_dataDate dataDate;
  BEGIN
  select data1 BULK COLLECT INTO l_dataDate from USER.TABLE_DATA;
  FORALL i IN l_dataDate.FIRST..l_dataDate.LAST
      BEGIN         
          INSERT INTO USER.DIMDATE SELECT
          to_number(to_char(l_dataDate(i), 'YYYYMMDDHH24MISS')),
          to_number(to_char(l_dataDate(i), 'YYYYMMDD')),
          l_dataDate(i),
          to_number(to_char(l_dataDate(i), 'DD')),
          to_char (l_dataDate(i), 'Day'),
          to_number(to_char (l_dataDate(i), 'MM')),
          to_char (l_dataDate(i), 'Month'),
          to_number(to_char(l_dataDate(i), 'YYYY')) FROM DUAL
          WHERE NOT EXISTS (SELECT 1 FROM USER.DIMDATE WHERE COD_FECHA=to_number(to_char(l_dataDate(i), 'YYYYMMDDHH24MISS'))); 
          COMMIT;
      EXCEPTION
      WHEN OTHERS THEN
          dbms_output.put_line('ERROR '||SUBSTR(SQLERRM, 1, 200));
      END;
  END;
  /
  </code></pre>
  
  <p>Is it posible to do something like this? Thanks in advance.</p>