Search notes:

PLW-06009: procedure "…" OTHERS handler does not end in RAISE or RAISE_APPLICATION_ERROR

The following snippet warns about a missing raise although the function clearly has one.
alter session set plsql_warnings = 'enable:all';

create or replace function tq84_plsql_warning(p varchar2) return varchar2
   authid definer
as   
    ret varchar2(1);
begin

    select * into ret from dual where dummy = p;
    return ret;

exception when others then

   if sysdate < date '2021-12-12' then
      return 'x';
   end if;

   raise;

end tq84_plsql_warning;
/

show errors

Pragma SUPPRESSES_WARNING_6009

With Oracle 21c(?), the warning about the missing raise or raise_application_error statements can be prevented by using the suppresses_warning_6009 pragma.

See also

raise_application_error
Oracle PL/SQL: Errors and warnings

Index