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 -N -r1.81.2.6 -r1.81.2.7 --- openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 13 Jan 2020 16:29:11 -0000 1.81.2.6 +++ openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 26 Jan 2020 17:10:55 -0000 1.81.2.7 @@ -216,11 +216,17 @@ -package_key "acs-tcl" \ -parameter "ReturnComplaint" \ -default "/packages/acs-tcl/lib/ad-return-complaint"] - ns_return 422 text/html [ad_parse_template \ - -params [list [list exception_count $exception_count] \ - [list exception_text $exception_text]] \ - $complaint_template] + try { + set html [ad_parse_template \ + -params [list [list exception_count $exception_count] \ + [list exception_text $exception_text]] \ + $complaint_template] + } on error {} { + set html [lang::util::localize $exception_text] + } + ns_return 422 text/html $html + # raise abortion flag, e.g., for templating set ::request_aborted [list 422 "Problem with Your Input"] }