Index: openacs-4/packages/acs-tcl/tcl/defs-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/defs-procs.tcl,v diff -u -r1.81.2.20 -r1.81.2.21 --- openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 6 Sep 2022 11:17:46 -0000 1.81.2.20 +++ openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 23 Nov 2022 07:45:44 -0000 1.81.2.21 @@ -269,7 +269,11 @@ along with the given title and explanation. Should be used when an unexpected error is detected while processing a page. } { - ad_return_exception_page 500 $title $explanation + if {[ns_conn isconnected]} { + ad_return_exception_page 500 $title $explanation + } else { + ns_log errror "ad_return_error called without a connection: $title\n$explanation" + } } ad_proc ad_return_warning {