New PL/SQL Compiler Warning in Oracle 11g

1

The PL/SQL compiler in Oracle 11g will give you a warning if it encounters a when others exception without a raise or raise_application_error.

SQL> alter session set plsql_warnings='enable:all';

Session altered.

SQL> create or replace procedure testje as
2  begin
3    dbms_output.put_line('why do something?');
4  exception
5    when others
6    then
7      null;
8    end;
9  /

SP2-0804: Procedure created with compilation warnings

SQL> sho err
Errors for PROCEDURE TESTJE:

LINE/COL ERROR
-------- -----------------------------------------------------------------
5/8      PLW-06009: procedure "TESTJE" OTHERS handler does not end in
RAISE or RAISE_APPLICATION_ERROR 
Share.

About Author

1 Comment