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 -r1.279.2.16 -r1.279.2.17 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 17 Oct 2014 15:53:00 -0000 1.279.2.16 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 9 Dec 2014 09:34:11 -0000 1.279.2.17 @@ -800,10 +800,16 @@ if {[$page_or_package procsearch $method] eq ""} { return [my error_msg "Method '$method' is not defined for this object"] } else { - #my msg "--invoke [my set object] id=$page_or_package method=$method ([my id] batch_mode $batch_mode)" + #my msg "--invoke [my set object] id=$page_or_package method=$method ([my id] batch_mode $batch_mode)" + set errorMsg "" if {$batch_mode} {[my id] set __batch_mode 1} - set r [my call $page_or_package $method ""] + catch { set r [my call $page_or_package $method ""]} errorMsg if {$batch_mode} {[my id] unset __batch_mode} + if {$errorMsg ne ""} { + return [my error_msg -status_code 404 \ + -template_file $error_template \ + [ns_quotehtml $errorMsg]] + } return $r } } else {