| 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 support a standardized UI for presenting errors contained in the error stack.
For more information, see Error handling and display methods.
| Constant Summary | |
CONTENT_TYPE_HTML | integer |
CONTENT_TYPE_HTML_COMMENT | integer |
CONTENT_TYPE_TEXT | integer |
CONTENT_TYPE_XML | integer |
| Function/Procedure Summary | |
get_inline_html | varchar2 |
get_text_errors | varchar2 |
get_warning_html | varchar2 |
show | |
show_error_page | |
show_html | |
show_html_comment | |
show_inline_html | |
show_inline_text | |
show_text | |
show_xml | |
| Constant Detail |
CONTENT_TYPE_HTML constant integer := 1
CONTENT_TYPE_HTML_COMMENT constant integer := 4
CONTENT_TYPE_TEXT constant integer := 3
CONTENT_TYPE_XML constant integer := 2
| Function/Procedure Detail |
function get_inline_html return varchar2
This function returns the error stack, with all lines but the first enclosed by <!-- and -->.
Note: An audit record is created each time this function is called. An audit record contains the date, time, and user ID of the person who called the function.
Example:
err_msg := wwerr_api_error_ui.get_inline_html;
function get_text_errors(
p_sep in varchar2 default owa . nl_char
) return varchar2This function returns the current error stack in the form of a string of varchar2 datatype. Error messages are separated by a value of the p_sep parameter.
Example:
err_msgs := wwerr_api_error_ui.get_text_errors;
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_warning_html return varchar2
Example:
declare
l_warnings varchar2(32000);
begin
...
l_warnings := get_warning_html;
...
end;
procedure show(
p_output_format in integer,
p_help_url in varchar2 default null,
p_text1 in varchar2 default null,
p_url1 in varchar2 default null,
p_text2 in varchar2 default null,
p_url2 in varchar2 default null,
p_text3 in varchar2 default null,
p_url3 in varchar2 default null
) Call this procedure to display the error stack in the output format requested: HTML, XML, or TEXT. The output format is specified by one of the error content constants. This procedure should be called by functions that are explicitly handling the exception and producing a UI from it.
Note: By default, the HTML error UI contains a Back button to navigate to the previous page. If any of the p_text_n arguments are not null, they are displayed instead of the Back button. This allows for customized error dialogs.
Example: In this example, the format requested is XML, two URLs with accompanying text are provided, and the parameters p_text3 and p_url3 are null.
wwerr_api_error_ui.show
(
p_output_format => 2,
p_text1 => "Help for this page",
p_url1 => http://portal.oracle.com:1500/30_HELP/30_HELP.page,
p_text2 => "Start Over.",
p_url2 => http://portal.oracle.com:1500/31_DESIGN/31_DESIGN.home,
);
p_output_format - the output format for the error stack.
Acceptable values are CONTENT_TYPE_HTML,
CONTENT_TYPE_XML, CONTENT_TYPE_TEXT and
CONTENT_TYPE_HTML_COMMENT.p_help_url - a string URL for the Help page,
if one is available. A null value indicates
that no Help page is available and no Help
icon is displayed.p_text1 - a text string to print next to the first URLp_url1 - the URL referred to in p_text1p_text2 - a text string to print next to the second URLp_url2 - the URL referred to in p_text2p_text3 - a string to print next to the third URLp_url3 - the URL referred to in p_text3
procedure show_error_page(
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
) Call this procedure to display an HTML page for errors that don't get generated from Oracle Portal. The page also contains a Back link. For example, during file upload mod_plsql checks the quota of the file being uploaded. If it detects a quota violation mod_plsql calls a URL (passed by Oracle Portal) to display the error message based on the type of quota violated.
Example:
...
when others then
wwerr_api_error_ui.show_error_page
(
p_domain => wwerr_api_error.DOMAIN_WWC,
p_sub_domain => 'err',
p_name => 'oracle_generic',
p_context => 'example.test',
p1 => sqlerrm
);
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 message
procedure show_html(
p_help_url in varchar2 default null,
p_text1 in varchar2 default null,
p_url1 in varchar2 default null,
p_text2 in varchar2 default null,
p_url2 in varchar2 default null,
p_text3 in varchar2 default null,
p_url3 in varchar2 default null
) Call this procedure to show the error stack in full screen HTML format. It is an alternative to the show method with the CONTENT_TYPE_HTML parameter value assumed.
This procedure should be called by functions that are explicitly handling the exception and producing a UI from it.
Note: By default, the HTML error UI contains a Back button to navigate to the previous page. If any of the p_text_n arguments are not null, they are displayed instead of the Back button. This allows for customized error dialogs.
Example: In this example, two URLs with accompanying text are provided, and the parameters p_text3 and p_url3 are null.
wwerr_api_error_ui.show_html
(
p_text1 => "Help for this page",
p_url1 => http://Portal.oracle.com:1500/30_HELP/30_HELP.page,
p_text2 => "Start Over.",
p_url2 => http://Portal.oracle.com:1500/31_DESIGN/31_DESIGN.home,
);
p_help_url - a string URL for the Help page,
if one is available. A null value indicates
that no Help page is available and no Help
icon is displayed.p_text1 - a text string to print next to the first URLp_url1 - the URL referred to in p_text1p_text2 - a text string to print next to the second URLp_url2 - the URL referred to in p_text2p_text3 - a string to print next to the third URLp_url3 - the URL referred to in p_text3procedure show_html_comment
Call this procedure to insert the current error stack in an HTML comment.
This can be useful in situations where the error stack contains a large number of error messages and it would not be very user friendly to show all those error messages to the end user. In such a case the error stack can be inserted into an HTML comment so that it is hidden from the end user. Then the error stack can be cleared and a single user friendly message added so that the user only sees that one error message.
procedure show_inline_html(
p_clear_stack in boolean default true,
p_show_warning in boolean default false
) Call this procedure to show the error or warning stack in inline HTML format. This means that the HTML generated by the API is displayed at the end of the current page, i.e. a separate new page is not displayed.
Example:
wwerr_api_error_ui.show_inline_html;
p_clear_stack - clear the error stack after displaying itp_show_warning - show error/warning stackprocedure show_inline_text
Call this procedure to return the error stack in inline text format. This means that the text generated by the API is displayed at the end of the current page, i.e. a separate new page is not displayed.
Example:
wwerr_api_error_ui.show_inline_text;
procedure show_text(
p_help_url in varchar2 default null,
p_text1 in varchar2 default null,
p_url1 in varchar2 default null,
p_text2 in varchar2 default null,
p_url2 in varchar2 default null,
p_text3 in varchar2 default null,
p_url3 in varchar2 default null
) Call this procedure to show the error stack in text format. It is an alternative to the show method with the CONTENT_TYPE_TEXT parameter value assumed.
This procedure should be called by functions that are explicitly handling the exception and producing a UI from it.
Example: In this example, two URLs with accompanying text are provided, and the parameters p_text3 and p_url3 are null.
wwerr_api_error_ui.show_text
(
p_text1 => "Help for this page",
p_url1 => http://Portal.oracle.com:1500/30_HELP/30_HELP.page,
p_text2 => "Start Over.",
p_url2 => http://Portal.oracle.com:1500/31_DESIGN/31_DESIGN.home,
);
p_help_url - a string URL for the Help page,
if one is available. A null value indicates
that no Help page is available and no Help
icon is displayed.p_text1 - a text string to print next to the first URL.p_url1 - the URL referred to in p_text1p_text2 - a text string to print next to the second URL.p_url2 - the URL referred to in p_text2p_text3 - a string to print next to the third URL.p_url3 - the URL referred to in p_text3
procedure show_xml(
p_help_url in varchar2 default null,
p_text1 in varchar2 default null,
p_url1 in varchar2 default null,
p_text2 in varchar2 default null,
p_url2 in varchar2 default null,
p_text3 in varchar2 default null,
p_url3 in varchar2 default null
) Call this procedure to show the error stack in XML format. It is an alternative to the show method with the CONTENT_TYPE_XML parameter value assumed.
Example: In this example, two URLs with accompanying text are provided, and the parameters p_text3 and p_url3 are null.
wwerr_api_error_ui.show_xml
(
p_text1 => "Help for this page",
p_url1 => http://Portal.oracle.com:1500/30_HELP/30_HELP.page,
p_text2 => "Start Over.",
p_url2 => http://Portal.oracle.com:1500/31_DESIGN/31_DESIGN.home,
);
p_help_url - a string URL for the Help page,
if one is available. A null value indicates
that no Help page is available and no Help
icon is displayed.p_text1 - a text string to print next to the first URL.p_url1 - the URL referred to in p_text1p_text2 - a text string to print next to the second URL.p_url2 - the URL referred to in p_text2p_text3 - a string to print next to the third URL.p_url3 - the URL referred to in p_text3
| 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 | |||||||