Index: openacs-4/packages/acs-tcl/lib/page-error.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/lib/page-error.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-tcl/lib/page-error.adp 22 Dec 2003 21:44:44 -0000 1.1 @@ -0,0 +1,17 @@ + + Server Error + +

+ There was a server error processing your request. We apologize. +

+ + +

+ Here is a detailed dump of what took place at the time of the error, which may assist a programmer in tracking down the problem: +

+
@stacktrace@
+
+ + The error has been logged and will be investigated by our system + programmers. + Index: openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl,v diff -u -r1.52 -r1.53 --- openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 6 Nov 2003 14:15:46 -0000 1.52 +++ openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 22 Dec 2003 21:44:44 -0000 1.53 @@ -710,37 +710,16 @@ } set error_url [ad_conn url] - + ad_call_proc_if_exists ds_add conn error $message - + if {![ad_parameter -package_id [ad_acs_kernel_id] "RestrictErrorsToAdminsP" dummy 0] || \ - [permission::permission_p -object_id [ad_conn package_id] -privilege admin] } { - if { [ad_parameter -package_id [ad_acs_kernel_id] "AutomaticErrorReportingP" "rp" 0] } { - set error_info $message - set report_url [ad_parameter -package_id [ad_acs_kernel_id] "ErrorReportURL" "rp" ""] - if { [empty_string_p $report_url] } { - ns_log Error "Automatic Error Reporting Misconfigured. Please add a field in the acs/rp section of form ErrorReportURL=http://your.errors/here." - } else { - set auto_report 1 - ns_returnerror 500 " -
-[export_form_vars error_url error_info] -This file has generated an error. - -

-
[ns_quotehtml $error_info]
[ad_footer]" - } - } else { - # No automatic report. - ns_returnerror 500 " -
[ns_quotehtml $message]
[ad_footer]" - } + [permission::permission_p -object_id [ad_conn package_id] -privilege admin] } { + # Serve the stacktrace + ns_return 500 text/html [ad_parse_template -params [list [list stacktrace $message]] "/packages/acs-tcl/lib/page-error"] } else { - ns_returnerror 500 " - The server has encountered an internal server error. The error - has been logged and will be investigated by our system - programmers. - " + # Do not serve up a stack trace, just an apologetic note + ns_return 500 text/html [ad_parse_template "/packages/acs-tcl/lib/page-error"] } set headers [ns_conn headers] ns_log Error "[ns_conn method] http://[ns_set iget $headers host][ns_conn url]?[ns_conn query]