Recognizing bad exception handling
Controlling conditions, cursors, and loops
Reusing code effectively
Writing code that’s easy to read and maintain
No matter how hard programmers try to make their code error free, they’re still human, and every system includes code that contains mistakes. In addition to simple mistakes in coding, some global mistakes are common among inexperienced programmers. To help you recognize these problems and get up to speed with PL/SQL more easily, this chapter describes ten of the most important mistakes to avoid when writing PL/SQL.
Never catch an unidentified exception without logging information about it. Chapter 15 mentions that the exception handler WHEN OTHERS is extremely useful, but it can also be the source of the most dangerous line of code that can exist in PL/SQL, as shown here:
when others then