This procedure adds an error message to the error stack that is used to display an error on an error page or inline in a notification. It can be called in a validation or process to add one or more errors to the error stack.
Note:
This procedure must be called before the Application Express application has performed the last validation or process. Otherwise, the error is ignored if it does not have a display location of apex_error.c_on_error_page.
Syntax
APEX_ERROR.ADD_ERROR (
    p_message          in varchar2,
    p_additional_info  in varchar2 default null,
    p_display_location in varchar2 );
Parameters
Table 10-1 ADD_ERROR Procedure Signature 1 Parameters
| Parameters | Description | 
|---|---|
| 
 
  | 
 Displayed error message.  | 
| 
 
  | 
 Additional error information needed if the error is displayed on the error page.  | 
| 
 
  | 
 Specifies where the error message is displayed. Use the constant   | 
Example
This example illustrates how to add a custom error message to the error stack. The error message is displayed inline in a notification. This example can be used in a validation or process.
apex_error.add_error (
    p_message          => 'This custom account is not active!',
    p_display_location => apex_error.c_inline_in_notification );