CREATE OR REPLACE PROCEDURE pro_PPT
IS
E1 EXCEPTION;
PRAGMA EXCEPTION_INIT(E1, -2200);
BEGIN
-- 块1开始------------------------------------------------------
DECLARE
n NUMBER := 1;
BEGIN
DBMS_OUTPUT.put_line('第1块'||n);
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.put_line('第1块异常-------');
END;
-- 块1结束------------------------------------------------------
-- 块2开始------------------------------------------------------
DECLARE
m NUMBER := 2;
BEGIN
DBMS_OUTPUT.put_line('第2块'||m);
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.put_line('第2块异常-------');
END;
-- 块2结束------------------------------------------------------
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.put_line('收到全局-------');
END;