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

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758205626, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/PL-SQL/errors-warnings/PLW-06009_procedure_OTHERS-handler-does-not-end-in-RAISE-or-RAISE_APPLICATION_ERROR(67): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78