PLS-483 error: Duplicate Handlers
SQL>
SQL> CREATE TABLE myLogTable (
2 code NUMBER,
3 message VARCHAR2(200),
4 info VARCHAR2(100)
5 );
Table created.
SQL>
SQL>
SQL> DECLARE
2 e_Exception1 EXCEPTION;
3 e_Exception2 EXCEPTION;
4 BEGIN
5 RAISE e_Exception1;
6 EXCEPTION
7 WHEN e_Exception2 THEN
8 INSERT INTO myLogTable (info)
9 VALUES ('Handler 1 executed!');
10 WHEN e_Exception1 THEN
11 INSERT INTO myLogTable (info)
12 VALUES ('Handler 3 executed!');
13 WHEN e_Exception1 OR e_Exception2 THEN
14 INSERT INTO myLogTable (info)
15 VALUES ('Handler 4 executed!');
16 END;
17 /
WHEN e_Exception1 OR e_Exception2 THEN
*
ERROR at line 13:
ORA-06550: line 13, column 3:
PLS-00483: exception 'E_EXCEPTION2' may appear in at most one exception handler in this block
ORA-06550: line 0, column 0:
PL/SQL: Compilation unit analysis terminated
SQL>
SQL> drop table myLogTable;
Table dropped.
SQL>
Related examples in the same category