$$plsql_line and $$plsql_unit : plsql_line « SQL PLUS Session Environment « Oracle PL/SQL Tutorial






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>








29.47.plsql_line
29.47.1.$$plsql_line and $$plsql_unit