| Oracle Application Server Portal PL/SQL API Reference - 10.1.2 | |||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||
| SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | |||||||
This package contains methods to add, retrieve and clear errors from an error stack, a warning stack and other related operations. It is used as part of error handling methodology.
For more information, see Error handling and display methods.
| Type Summary | |
error_record | record |
error_table | table |
| Constant Summary | |
DOMAIN_WOR | varchar2(12) |
DOMAIN_WWC | varchar2(12) |
DOMAIN_WWF | varchar2(12) |
DOMAIN_WWS | varchar2(12) |
DOMAIN_WWU | varchar2(12) |
DOMAIN_WWV | varchar2(12) |
SUBDOMAIN_POB | varchar2(12) |
SUBDOMAIN_WEBDAV | varchar2(12) |
| Function/Procedure Summary | |
add | |
add | |
add_warning | |
add_warning | |
clear | |
clear_warning | |
get_count | number |
get_errors | error_table |
get_text_stack | varchar2 |
get_text_warning_stack | varchar2 |
get_top | error_record |
get_warning_count | number |
get_warning_top | error_record |
get_warnings | error_table |
is_empty | boolean |
is_warning_empty | boolean |
| Type Detail |
type error_record is record (
product varchar2(12),
code integer,
text varchar2(2000),
context varchar2(64),
msg_domain wwnls_strings$.domain%type,
msg_sub_domain wwnls_strings$.sub_domain%type default 'all',
msg_name wwnls_strings$.name%type,
msg_id wwnls_strings$.id%type,
msg_p1 varchar2(2000) default null,
msg_p2 varchar2(2000) default null,
msg_p3 varchar2(2000) default null,
msg_p4 varchar2(2000) default null,
msg_p5 varchar2(2000) default null,
msg_p6 varchar2(2000) default null,
msg_p7 varchar2(2000) default null,
msg_p8 varchar2(2000) default null,
msg_p9 varchar2(2000) default null,
call_stack varchar2(4000) default null,
show_to_user boolean default true
)
product - the name of the product that owns the errorcode - the record ID returned as an NLS string IDtext - the text string of the error messagecontext - the name of the method in which the error occurredmsg_domain - the name of the domain that generated the errormsg_sub_domain - the name of the sub-domain that owns the messagemsg_name - an identifier for the messagemsg_id - a unique identifier for the messgemsg_p1 - passed-in values for the resulting display messagemsg_p2 - passed-in values for the resulting display messagemsg_p3 - passed-in values for the resulting display messagemsg_p4 - passed-in values for the resulting display messagemsg_p5 - passed-in values for the resulting display messagemsg_p6 - passed-in values for the resulting display messagemsg_p7 - passed-in values for the resulting display messagemsg_p8 - passed-in values for the resulting display messagemsg_p9 - passed-in values for the resulting display messagecall_stack - this field is not currently usedshow_to_user - should this error message be shown to the user?type error_table is table of error_record index by binary_integer
| Constant Detail |
DOMAIN_WOR constant varchar2(12) := 'wor'
DOMAIN_WWC constant varchar2(12) := 'wwc'
DOMAIN_WWF constant varchar2(12) := 'wwf'
DOMAIN_WWS constant varchar2(12) := 'wws'
DOMAIN_WWU constant varchar2(12) := 'wwu'
DOMAIN_WWV constant varchar2(12) := 'wwv'
SUBDOMAIN_POB constant varchar2(12) := 'pob'
SUBDOMAIN_WEBDAV constant varchar2(12) := 'webdav'
| Function/Procedure Detail |
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,
p_show_to_user in boolean default true
) The add procedure searches the NLS string storage and retrieves an NLS string for the given domain, sub domain, name and current session language. The returned NLS string is then used as an error message that is added to the error stack. You can define values for the substitution parameters when calling this procedure. The error message must contain the markup characters %1 to %9 in order to pass in the appropriate parameter values.
Notes:
Example:
declare
l_error_table wwerr_api_error.error_table;
begin
wwerr_api_error.add
(
p_domain => wwerr_api_error.DOMAIN_WWV,
p_sub_domain => 'oracle',
p_name => 'generic',
p_context => 'example.test',
p1 => sqlerrm
);
l_error_table := wwerr_api_error.get_errors;
end;
p_domain - the short name of the product or domain in which the
error occurredp_sub_domain - the subsystem that generated the errorp_name - the name of the error within the domain and
sub-domainp_context - the name of the function in which the error occurredp1 - first passed-in value for the resulting display messagep2 - second passed-in value for the resulting display messagep3 - third passed-in value for the resulting display messagep4 - fourth passed-in value for the resulting display messagep5 - fifth passed-in value for the resulting display messagep6 - sixth passed-in value for the resulting display messagep7 - seventh passed-in value for the resulting display messagep8 - eighth passed-in value for the resulting display messagep9 - nineth passed-in value for the resulting display messagep_show_to_user - should this error message be shown to the user?
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,
p_show_to_user in boolean default true
) The add procedure searches the NLS string storage and retrieves an NLS string for the given domain, message ID and current session language. The returned NLS string is then used as an error message that is added to the error stack. You can define values for the substitution parameters when calling this procedure. The error message must contain the mark up characters %1 to %9 in order to pass in the appropriate parameter values.
Notes:
Example:
declare
l_error_table wwerr_api_error.error_table;
begin
wwerr_api_error.add
(
p_domain => wwerr_api_error.WWV,
p_id => 11230,
p_context => 'example.test',
p1 => sqlerrm
);
l_error_table := wwerr_api_error.get_errors;
end;
p_domain - the short name of the product in which the
error occurredp_id - the ID number of the errorp_context - the name of the function in which the
error occurredp1 - first passed-in value for the resulting display messagep2 - second passed-in value for the resulting display messagep3 - third passed-in value for the resulting display messagep4 - fourth passed-in value for the resulting display messagep5 - fifth passed-in value for the resulting display messagep6 - sixth passed-in value for the resulting display messagep7 - seventh passed-in value for the resulting display messagep8 - eighth passed-in value for the resulting display messagep9 - nineth passed-in value for the resulting display messagep_show_to_user - should this error message be shown to the user?
procedure add_warning(
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,
p_show_to_user in boolean default true
) Call this procedure to add a warning to the warning stack, given the domain, sub-domain, name and context.
Notes:
- Because any specific warning may be produced in multiple places in the executing code, each warning is identified in its unique context, which includes both package and method names, as: [package].[function], for example: wwpro_api_provider.show.Example:
declare
l_warning_table wwerr_api_error.error_table;
begin
wwerr_api_error.add_warning
(
p_domain => wwerr_api_error.DOMAIN_WWC,
p_sub_domain => 'err',
p_name => 'oracle_generic',
p_context => 'example.test',
p1 => 'test_error'
);
l_warning_table := wwerr_api_error.get_warnings;
end;
p_domain - the short name of the product or domain in which the
warning occurredp_sub_domain - the subsystem that generated the warningp_name - the name of the warning within the domain and
sub-domainp_context - the name of the function in which the warning
occurredp1 - first passed-in value for the resulting display messagep2 - second passed-in value for the resulting display messagep3 - third passed-in value for the resulting display messagep4 - fourth passed-in value for the resulting display messagep5 - fifth passed-in value for the resulting display messagep6 - sixth passed-in value for the resulting display messagep7 - seventh passed-in value for the resulting display messagep8 - eighth passed-in value for the resulting display messagep9 - nineth passed-in value for the resulting display messagep_show_to_user - should this warning message be shown to the user?
procedure add_warning(
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,
p_show_to_user in boolean default true
) Call this procedure to add a warning to the warning stack, given the domain, ID, and context.
Notes:
- Because any specific warning may be produced in multiple places in the executing code, each warning is identified in its unique context, which includes both package and method names, as: [package].[function], for example: wwpro_api_provider.show.Example:
declare
l_warning_table wwerr_api_error.error_table;
begin
wwerr_api_error.add_warning
(
p_domain => wwerr_api_error.WWV,
p_id => 36000,
p_context => 'example.test',
p1 => 'test_warning'
);
l_warning_table := wwerr_api_error.get_warnings;
end;
p_domain - the short name of the product in which the
warning occurredp_id - the ID number of the warningp_context - the name of the function in which the
warning occurredp1 - first passed-in value for the resulting display messagep2 - second passed-in value for the resulting display messagep3 - third passed-in value for the resulting display messagep4 - fourth passed-in value for the resulting display messagep5 - fifth passed-in value for the resulting display messagep6 - sixth passed-in value for the resulting display messagep7 - seventh passed-in value for the resulting display messagep8 - eighth passed-in value for the resulting display messagep9 - nineth passed-in value for the resulting display messagep_show_to_user - should this warning message be shown to the user?procedure clear
Call this procedure to delete all records in the error stack.
Example:
wwerr_api_err.clear;
procedure clear_warning
Call this procedure to delete all records in the warning stack.
Example:
wwerr_api_err.clear_warning;
function get_count return number
Example:
declare
l_err_cnt number
begin
l_err_cnt := wwerr_api_error.get_count;
end;
function get_errors return error_table
Call this function to return the error stack records in a table. Error handling routines can use this information to take specific corrective action or to provide their own UI.
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;
function get_text_stack(
p_sep in varchar2 default owa . nl_char
) return varchar2Call this function to return the current error stack in a string.
Example:
wwerr_api_error.get_text_stack;
p_sep - the delimiter used between fields in an error
stack record. Note that a delimiter is a character,
such as a comma or string, that is used to separate
or to mark the start and end of column items of data
in a database, or some other type of file or
data container.
function get_text_warning_stack(
p_sep in varchar2 default owa . nl_char
) return varchar2Call this function to return the current warning stack in a string.
Example:
wwerr_api_error.get_text_warning_stack;
p_sep - the delimiter used between fields in a warning
stack record. Note that a delimiter is a character,
such as a comma or string, that is used to separate
or to mark the start and end of column items of data
in a database, or some other type of file or
data container.function get_top return error_record
Call this function to return the uppermost entry in the error stack. Error handling routines can use this information to take specific corrective action or to provide their own UI, such as placing the error on a status line.
Example:
l_error_rec wwerr_api_error.error_record;
l_error_rec := wwerr_api_error.get_top;
function get_warning_count return number
Example:
declare
l_wrn_cnt number
begin
l_wrn_cnt := wwerr_api_error.get_warning_count;
end;
function get_warning_top return error_record
Call this function to return the uppermost entry in the warning stack. Error handling routines can use this information to take specific corrective action or to provide their own UI, such as placing the warning on a status line.
Example:
l_warning_rec wwerr_api_error.error_record;
l_warning_rec := wwerr_api_error.get_warning_top;
function get_warnings return error_table
Call this function to return the warning stack records in a table. Error handling routines can use this information to take specific corrective action or to provide their own UI.
Example:
declare
l_warnings wwerr_api_error.error_table;
begin
l_warnings := wwerr_api_error.get_warnings;
end;
function is_empty return boolean
Example:
wwerr_api_error.is_empty;
function is_warning_empty return boolean
Example:
wwerr_api_error.is_warning_empty;
| Oracle Application Server Portal PL/SQL API Reference - 10.1.2 | |||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||
| SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | |||||||