I sometimes do something like ....
IF very-likely-condition THEN NULL; ELSE <<code to deal with the unlikely condition>> END IF;
Which gives warning PLW-06002 with unreachable code from the PL / SQL compiler in the NULL string to set IF.
Now that I can clearly ignore the warning and / or refactoring, the IF statement is NOT, I think it reads this way better.
Does anyone know if there is another way to insert an empty statement so that I don't get a compiler warning?
EDIT:
I am not saying that I often do this ... in fact, I did it very rarely. But sometimes I think he reads this way better.
EDIT 2:
In addition, there are other scenarios where this may be true for this (for example, ignoring a specific error in the EXCEPTION block). I used IF only as a simple example to illustrate this point.
source share