I have one function and there are 2 lines (Line no 8 and 11) that will never be reached (Dead Code).
But in warnings it is showing only line no 8. I want to show all unreachable line of code at a time.
Is there any way to reach this ?
SQL> ALTER SESSION SET PLSQL_WARNINGS='ENABLE:ALL';
Session altered.
SQL> CREATE OR REPLACE FUNCTION xx_test_function RETURN NUMBER
2 IS
3 x NUMBER := 10;
4 BEGIN
5 IF x = 10 THEN
6 x := 20;
7 ELSE
8 x := 100; -- dead code (never reached)
9 END IF;
10 RETURN x;
11 dbms_output.put_line('Pint the value '||x); -- dead code (never reached)
12 END;
13 /
SP2-0806: Function created with compilation warnings
SQL> show err
Errors for FUNCTION XX_TEST_FUNCTION:
LINE/COL ERROR
-------- -----------------------------------------------------------------
8/5 PLW-06002: Message 6002 not found; No message file for
product=plsql, facility=PLW
Edited by: AChatterjee on Apr 18, 2011 9:17 AM