APP_EXCEPTION: Exception Processing APIs

You should use the APPCORE package APP_EXCEPTION to raise exceptions in the PL/SQL procedures written for your forms.

APP_EXCEPTION.RAISE_EXCEPTION

Summary
procedure  APP_EXCEPTION.RAISE_EXCEPTION(
 exception_type varchar2 default null,
			  exception_code number   default null,
			  exception_text varchar2 default null);
Location APPCORE library and database (stored procedure)
Description This procedure stores exception information and raises exception form_trigger_failure.

Arguments

exception_text Additional context information.
exception_type Error prefix that specifies error type (for example, ORA or APP)
exception_code The number that identifies the error.

APP_EXCEPTION.RETRIEVE

Summary
procedure  APP_EXCEPTION.RETRIEVE;
Location APPCORE library and database (stored procedure)
Description This procedure retrieves exception information from the database.

APP_EXCEPTION.GET_TYPE

Summary
function  APP_EXCEPTION.GET_TYPE return varchar2;
Location APPCORE library and database (stored function)
Description This function returns the exception type.

APP_EXCEPTION.GET_CODE

Summary
function  APP_EXCEPTION.GET_CODE return number;
Location APPCORE library and database (stored function)
Description This function returns the exception code.

APP_EXCEPTION.GET_TEXT

Summary
function  APP_EXCEPTION.GET_TEXT return varchar2;
Location APPCORE library and database (stored function)
Description This function returns the exception text.

APP_EXCEPTION.RECORD_LOCK_EXCEPTION

Description This is a predefined exception. Call it in an exception handler to handle cases where the record cannot be locked. It is usually used with the APP_EXCEPTION.RECORD_LOCK_ERROR procedure.

APP_EXCEPTION.RECORD_LOCK_ERROR

Summary
procedure  APP_EXCEPTION.RECORD_LOCK_ERROR (
counter  IN   OUT   number);
Description This procedure asks the user to continue or cancel an attempt to lock a record. It returns to the calling procedure to try again if the user continues. It displays an "Unable to reserve record" acknowledgement and raises FORM_TRIGGER_FAILURE if the user cancels.
APP_EXCEPTION.RECORD_LOCK_ERROR only asks the user every two attempts to lock a record (e.g., counter = 2, 4, 6, etc.). The calling procedure should attempt to lock the record in a loop and call RECORD_LOCK_ERROR in a WHEN APP_EXCEPTION.RECORD_ LOCK_EXCEPTION exception handler inside the loop. If the user continues, RECORD_LOCK_ERROR returns and the loop repeats. If the user cancels, RECORD_LOCK_ERROR raises FORM_TRIGGER_FAILURE and the loop exits.

Arguments

counter Maintained by RECORD_LOCK_ERROR to count the attempts to lock a record. Calling procedure should initialize to null or 0.

APP_EXCEPTION.DISABLED

Summary
procedure  APP_EXCEPTION.DISABLED;
Description This procedure rings the bell. Call this procedure to disable simple functions (typically in a KEY- trigger).