Is ad_return_complaint supposed to cause an error in the server log? If I call this from a simple .tcl page:
ad_return_complaint 1 fubar
I get this in the log:
[21/Jul/2011:17:20:42][25922.1088448832][-conn:edjustis::1] Warning: propagating abortion from www/test/error.tcl (status 200): 'Problem with Your Input')
[21/Jul/2011:17:20:42][25922.1088448832][-conn:edjustis::1] Warning: propagating abortion from packages/acs-tcl/lib/page-error.tcl (status 200): 'Problem with Your Input')
[21/Jul/2011:17:20:42][25922.1088448832][-conn:edjustis::1] Error: rp_report_error: Error rendering error page (!)
ADP_ABORT
while executing
"error ADP_ABORT "
(procedure "adp_abort" line 2)
invoked from within
"adp_abort"
invoked from within
"if { [file exists $__adp_stub.tcl] } {
# ensure that data source preparation procedure exists and is up-to-date
adp_init tcl $__adp_stub
..."
("uplevel" body line 3)
invoked from within
"uplevel {
if { [file exists $__adp_stub.tcl] } {
# ensure that data source preparation procedure exists and is up-to-date
adp_init t..."
(procedure "adp_prepare" line 2)
invoked from within
"adp_prepare"
invoked from within
"template::adp_parse packages/acs-tcl/lib/page-error {stacktrace ADP_ABORT\n\ \ \ \ while\ executing\n\"error\ ADP_ABORT\ \"\n\ \ \ \ (proced..."
("uplevel" body line 1)
invoked from within
"uplevel [list template::adp_parse [template::util::url_to_file $template [ad_conn file]] $template_params]"
(procedure "ad_parse_template" line 15)
invoked from within
"ad_parse_template -params $params "/packages/acs-tcl/lib/page-error""
invoked from within
"set rendered_page [ad_parse_template -params $params "/packages/acs-tcl/lib/page-error"]"
("uplevel" body line 2)
invoked from within
"uplevel $body "
This seems to be caused by these lines, from the definition for ad_return_complaint:
# raise abortion flag, e.g., for templating
global request_aborted
set request_aborted [list 200 "Problem with Your Input"]
Is this intentional? The docs for ad_return_complaint say that it should "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)". This doesn't seem like a full error to me.
Since our existing application uses ad_return_complaint in many places, we'd like to continue using it. This is, however, creating a lot of noise in our error log.
We're open to suggestions. Thanks in advance for your replies.
Kind regards,
Justis Peters