SQL>
SQL> CREATE OR REPLACE PROCEDURE calculate_totals
2 IS
3 BEGIN
4 RAISE VALUE_ERROR;
5 EXCEPTION
6 WHEN OTHERS
7 THEN
8 DBMS_OUTPUT.put_line('Current line number ' || $$plsql_line);
9 DBMS_OUTPUT.put_line('Failed in program '|| $$plsql_unit);
10 END calculate_totals;
11 /
Procedure created.
SQL>
SQL> EXEC calculate_totals;
PL/SQL procedure successfully completed.
SQL>
|