December 2001
Intermediate to advanced
640 pages
15h 11m
English
As defined earlier in this chapter, exceptions are errors or flags in PL/SQL. Exceptions are a way of gracefully handling certain conditions within the PL/SQL block, such as “no records returned from the SQL query” or “last record returned from the SQL query.” Other exceptions can be syntax errors in the PL/SQL code itself or errors returned from Oracle9i.
The syntax for exception handling, illustrated in Listing 3.2, is optional. If the exception area of the PL/SQL block is not handled, then it is propagated to the calling routine. For example, the SHOW ERRORS command in SQL*Plus is used to show any errors from PL/SQL that were not handled by the PL/SQL block. The exception syntax is
Read now
Unlock full access