Oracle9iAS Portal Developer Kit

add procedure (domain, sub-domain, name, context)

Contained in package wwerr_api_error.

Call this procedure to add an error to the error stack, given the domain, sub-domain, name 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 both 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 name space 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_sub_domain in varchar2 default 'all',

p_name in varchar2,

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 or domain in which the error occurred.

Datatype: in varchar2

p_sub_domain

The subsystem that generated the error.

Datatype: in varchar2
Default: 'all'

 p_name

The name of the error within the domain and sub-domain.

Datatype: in varchar2

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:

When 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.DOMAIN_WWC,
p_sub_domain => 'err',
p_name => 'oracle_generic',
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