oracle inner exception

DECLARE
  -- Local variables here
  i INTEGER;
BEGIN
  -- Test statements here
  dbms_output.put_line('start...');
  i := 0;
  LOOP
    EXIT WHEN i > 5;
    BEGIN
      dbms_output.put_line(to_char(i) || '.do something...');
      IF i = 3 THEN
        i := i / 0;
      END IF;
    
    EXCEPTION
      WHEN OTHERS THEN
        dbms_output.put_line('inner exception!');
    END;
    i := i + 1;
    dbms_output.put_line('do other things...');
  END LOOP;
  dbms_output.put_line('end...');
END;

你可能感兴趣的:(oracle inner exception)