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