Search Results application_exception




Overview

APP_EXCEPTIONS is a foundational Oracle E-Business Suite package owned by the APPS schema. Contrary to the expectation raised by its name, it is not a transactional processing package but rather a lightweight declaration package that publishes a standardized set of user-defined PL/SQL exceptions for use across the entire EBS code base. Its documented purpose is succinct: "APP user-defined exceptions." The package body contains no executable logic, no procedures, and no functions; instead, it consists solely of exception declarations and the corresponding compiler pragmas that bind those named exceptions to specific Oracle error numbers. This makes it one of the most widely depended-upon objects in the EBS data dictionary, with the ETRM metadata recording that it is referenced by 645 other packages.

Key Procedures and Functions

The package exposes zero documented procedures or functions. Its entire public surface consists of two named exceptions and two pragmas:

  • application_exception — A user-defined exception bound via pragma exception_init(application_exception, -20001). It provides a named handle for the generic Oracle error number -20001, which EBS developers conventionally raise to signal a controlled, application-level business error to a calling form or program.
  • record_lock_exception — A user-defined exception bound via pragma exception_init(record_lock_exception, -0054). It maps to Oracle error ORA-00054 (resource busy, acquire with NOWAIT), allowing code to trap row-level locking contention under a descriptive name instead of referencing the raw error number.

The header also carries a revision marker ($Header: AFEXCP1S.pls 115.0 99/07/16), indicating the specification has been stable since the late 1990s and is unchanged across the 12.1.1 and 12.2.2 releases. The module is declared AUTHID CURRENT_USER, so it executes with the privileges of the calling invoker rather than the defining schema.

Tables Accessed

APP_EXCEPTIONS accesses no tables. Because it contains only declarations, it performs no SQL, no DML, and no queries, and therefore references no APPS synonyms or base tables. Its sole effect is resolved at compile time in the calling unit, where the exception names and their associated error numbers become available for exception handling.

Usage Notes

The package is invoked implicitly whenever a dependent program compiles or executes. Typical usage appears in exception-handling blocks of forms libraries, concurrent program packages, and custom PL/SQL, where developers write constructs such as WHEN app_exceptions.application_exception THEN ... or WHEN app_exceptions.record_lock_exception THEN .... By referencing the shared declaration rather than hard-coding error numbers, developers gain consistency and readability across the application. Custom code should follow the same pattern, and should never redefine these exceptions locally. Given the package's read-only, declaration-only nature, it carries no runtime performance overhead and requires no maintenance beyond ensuring it remains valid in the APPS schema. Its exceptional breadth of reuse — referenced by 645 packages — underscores why it must remain stable and available in every EBS environment.