Index: openacs-4/packages/xowiki/tcl/package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/package-procs.tcl,v diff -u -N -r1.332.2.144 -r1.332.2.145 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 16 Jan 2024 17:35:16 -0000 1.332.2.144 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 30 Jan 2024 10:15:01 -0000 1.332.2.145 @@ -1472,18 +1472,10 @@ # # The exception was a real error # - ad_log error "error during invocation of method $method errorMsg: $errorMsg, $::errorInfo" - - if {[ns_conn isconnected]} { - # - # When connected, also try to render the error to the - # user. - # - return [:error_msg -status_code 500 \ - -template_file $error_template \ - "error during [ns_quotehtml $method]:
[ns_quotehtml $errorMsg]
"] - } + return [:error_msg -status_code 500 \ + -template_file $error_template \ + "error during [ns_quotehtml $method]:
[ns_quotehtml $errorMsg]
"] } } finally { @@ -1510,6 +1502,10 @@ } Package instproc error_msg {{-title Error} {-template_file error-template} {-status_code 200} error_msg} { + if {![ns_conn isconnected]} { + ad_log error "Trying to return error page with status $status in disconnacted stage; message: [ns_striphtml $error_msg]" + return + } if {![regexp {^[./]} $template_file]} { set template_file [:get_adp_template $template_file] }