Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -r1.133.2.54 -r1.133.2.55 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 1 Oct 2014 09:48:05 -0000 1.133.2.54 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 16 Oct 2014 07:20:41 -0000 1.133.2.55 @@ -3269,13 +3269,21 @@ @param code Code to be executed that could throw and error @param finally Cleanup code to be executed even if an error occurs } { - global errorInfo errorCode # Execute CODE. set return_code [catch {uplevel $code} string] - set s_errorInfo $errorInfo - set s_errorCode $errorCode + if {[info exists ::errorInfo]} { + set s_errorInfo $::errorInfo + } else { + set s_errorInfo "" + } + if {[info exists ::errorCode]} { + set s_errorCode $::errorCode + } else { + set s_errorCode "" + } + # As promised, always execute FINALLY. If FINALLY throws an # error, Tcl will propagate it the usual way. If FINALLY contains # stuff like break or continue, the result is undefined.