ad_return_complaint (public)
ad_return_complaint exception_count exception_text
Defined in packages/acs-tcl/tcl/defs-procs.tcl
Return a page complaining about the user's input (as opposed to an error in our software, for which ad_return_error is more appropriate)
- Parameters:
- exception_count (required)
- Number of exceptions. Used to say either 'a problem' or 'some problems'.
- exception_text (required)
- HTML chunk to go inside an UL tag with the error messages.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_folder_with_page, create_workflow_with_instance, xowiki_test_cases, create_form_with_form_instance
Source code: set complaint_template [parameter::get_from_package_key -package_key "acs-tcl" -parameter "ReturnComplaint" -default "/packages/acs-tcl/lib/ad-return-complaint"] try { set html [ad_parse_template -params [list [list exception_count $exception_count] [list exception_text $exception_text]] $complaint_template] } on error {} { set html [lang::util::localize $exception_text] } ns_return 422 text/html $html # raise abortion flag, e.g., for templating set ::request_aborted [list 422 "Problem with Your Input"]XQL Not present: Generic, PostgreSQL, Oracle