Re-raise the exception to indicate there is a problem : RAISE « PL SQL Statements « Oracle PL/SQL Tutorial






SQL> CREATE OR REPLACE PROCEDURE execDDL (ddl_string IN VARCHAR2)
  2     AUTHID CURRENT_USER IS
  3  BEGIN
  4     EXECUTE IMMEDIATE ddl_string;
  5  EXCEPTION
  6     WHEN OTHERS
  7     THEN
  8
  9        DBMS_OUTPUT.PUT_LINE ('Dynamic SQL Failure: ' || SQLERRM);
 10        DBMS_OUTPUT.PUT_LINE ('   on statement: "' || ddl_string || '"');
 11
 12        RAISE;
 13  END;
 14  /

Procedure created.

SQL>
SQL>








22.24.RAISE
22.24.1.Check condition first, then raise exception
22.24.2.Re-raise the exception to indicate there is a problem
22.24.3.Raise the exception.
22.24.4.Define local exceptioon variable.