Oracle9iAS Portal Developer Kit

add procedure (domain, ID, context)

Contained in package wwerr_api_error.

Call this procedure to add an error to the error stack, given the domain, ID, and context.

Notes:

  • Because any specific error may be produced in multiple places in the executing code, each error is identified in its unique context, which includes the package and method names, as: [package].[function], for example: wwpro_api_provider.show.

  • When other errors exist, push the Oracle error onto the stack. The WWV namespace is predefined with the error message oracle.generic (11230), and with one parameter, which is passed as sqlerrm.
  • Errors are stacked on the name of the method that experienced the error, for example: wwpro_api_provider.show.

procedure add

(

p_domain in varchar2,

p_id in integer,

p_context in varchar2,

p1 in varchar2 default null,

p2 in varchar2 default null,

p3 in varchar2 default null,

p4 in varchar2 default null,

p5 in varchar2 default null,

p6 in varchar2 default null,

p7 in varchar2 default null,

p8 in varchar2 default null,

p9 in varchar2 default null

);

Version: Oracle Portal 3.0.6.6.5 or later

Parameters:

p_domain

The short name of the product in which the error occurred.

Datatype: in varchar2

p_id

The ID number of the error.

Datatype: in integer

p_context

The name of the function in which the error occurred.

Datatype: in varchar2

p1, p2, ... p9

Passed-in values for the resulting display message.

Datatype: in varchar2
Default: null

Exceptions:

If an error occurs, a PROVIDER_EXECUTION_EXCEPTION is raised.

Example:

declare

l_error_table wwerr_api_error.error_table;

begin

wwerr_api_error.add
(

p_domain => wwerr_api_error.WWV,
p_id => 36000,
p_context => 'example.test',
p1 => 'test_error'

);
l_error_table := wwerr_api_error.get_errors;

end;

Related topics

The PL/SQL API Reference is part of the Portal Developer Kit on Portal Studio