Tell Me Glossary
 

Handling Exceptions: Part 1

Previous previous|next Next Page

A block always terminates when PL/SQL raises an exception, but you can specify an exception handler to perform final actions before the block ends.

  • An Oracle error occurs and the associated exception is raised automatically. For example, if the error ORA-01403 occurs when no rows are retrieved from the database in a SELECT statement, then PL/SQL raises the exception NO_DATA_FOUND. These errors are converted into predefined exceptions.
  • Depending on the business functionality your program is implementing, you may have to explicitly raise an exception. You raise an exception explicitly by issuing the RAISE statement within the block. The exception being raised may be either userdefined or predefined.
  • There are some nonpredefined Oracle errors. These errors are any standard Oracle errors that are not predefined. You can explicitly declare exceptions and associate them with the nonpredefined Oracle errors.