Index: openacs-4/packages/acs-tcl/tcl/adp-parser-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/adp-parser-procs.tcl,v diff -u -r1.3 -r1.3.2.1 --- openacs-4/packages/acs-tcl/tcl/adp-parser-procs.tcl 27 Oct 2014 16:40:05 -0000 1.3 +++ openacs-4/packages/acs-tcl/tcl/adp-parser-procs.tcl 17 Aug 2015 17:45:03 -0000 1.3.2.1 @@ -179,14 +179,11 @@ set errno [catch { doc_eval_in_separate_frame $compiled_adp } error] incr doc_adp_depth -1 - - global errorCode - if { $errno == 0 || $errorCode eq "doc_adp_abort" } { + if { $errno == 0 || $::errorCode eq "doc_adp_abort" } { return $adp_var } - global errorInfo - return -code $errno -errorcode $errorCode -errorinfo $errorInfo $error + return -code $errno -errorcode $::errorCode -errorinfo $::errorInfo $error } ad_proc -public doc_adp_puts { value } { Index: openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl,v diff -u -r1.36 -r1.36.2.1 --- openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 27 Oct 2014 16:40:05 -0000 1.36 +++ openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 17 Aug 2015 17:45:03 -0000 1.36.2.1 @@ -603,8 +603,7 @@ apm_callback_and_log $callback "The follow error occured during the uncompression process:
[ad_quotehtml $errmsg]

" - global errorInfo - ns_log Error "Error loading APM file form url $url: $errmsg\n$errorInfo" + ns_log Error "Error loading APM file form url $url: $errmsg\n$::errorInfo" return } @@ -662,8 +661,7 @@

The package cannot be installed. \n" - global errorInfo - ns_log Error "Error loading APM file form url $url: Bad package .info file. $errmsg\n$errorInfo" + ns_log Error "Error loading APM file form url $url: Bad package .info file. $errmsg\n$::errorInfo" return } file delete -force $tmpdir Index: openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl,v diff -u -r1.109 -r1.109.2.1 --- openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 27 Oct 2014 16:40:05 -0000 1.109 +++ openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 17 Aug 2015 17:45:03 -0000 1.109.2.1 @@ -917,8 +917,7 @@ apm_callback_and_log $callback "

Installed $version(package-name), version $version(name).

" } { - global errorInfo - ns_log Error "apm_package_install: Error installing $version(package-name) version $version(name): $errmsg\n$errorInfo" + ns_log Error "apm_package_install: Error installing $version(package-name) version $version(name): $errmsg\n$::errorInfo" apm_callback_and_log -severity Error $callback [subst {

Failed to install $version(package-name), version $version(name). The following error was generated:

@@ -977,9 +976,8 @@ apm_callback_and_log $callback "

Mounted an instance of the package at /${priority_mount_path}

" } { # Another package is mounted at the path so we cannot mount - global errorInfo - set error_text "Package $version(package-name) could not be mounted at /$version(auto-mount) , there may already be a package mounted there, the error is: $error" - ns_log Error "apm_package_install: $error_text \n\n$errorInfo" + set error_text "Package $version(package-name) could not be mounted at /$version(auto-mount) , there may already be a package mounted there, the error is: $error" + ns_log Error "apm_package_install: $error_text \n\n$::errorInfo" apm_callback_and_log $callback "

$error_text

" } @@ -1630,10 +1628,9 @@ $spec_file } errmsg] } { - global errorInfo - apm_callback_and_log -severity Error $callback "

[string totitle $package_key] not installed. + apm_callback_and_log -severity Error $callback "

[string totitle $package_key] not installed.

Error: -

[ad_quotehtml $errmsg]
[ad_quotehtml $errorInfo]
" +
[ad_quotehtml $errmsg]
[ad_quotehtml $::errorInfo]
" } } } @@ -2172,8 +2169,7 @@ } { # We don't error hard here, because we don't want the whole process to fail if there's just one # package with a bad .info file - global errorInfo - ns_log Error "apm_get_package_repository: Error while checking package info file $spec_file: $errmsg\n$errorInfo" + ns_log Error "apm_get_package_repository: Error while checking package info file $spec_file: $errmsg\n$::errorInfo" } } } Index: openacs-4/packages/acs-tcl/tcl/form-processing-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/form-processing-procs.tcl,v diff -u -r1.66 -r1.66.2.1 --- openacs-4/packages/acs-tcl/tcl/form-processing-procs.tcl 28 Jun 2015 19:24:42 -0000 1.66 +++ openacs-4/packages/acs-tcl/tcl/form-processing-procs.tcl 17 Aug 2015 17:45:03 -0000 1.66.2.1 @@ -1192,8 +1192,7 @@ } 1 { # TCL_ERROR - global errorInfo errorCode - error $error $errorInfo $errorCode + error $error $::errorInfo $::errorCode } 2 { # TCL_RETURN Index: openacs-4/packages/acs-tcl/tcl/openacs-kernel-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/openacs-kernel-procs.tcl,v diff -u -r1.10 -r1.10.10.1 --- openacs-4/packages/acs-tcl/tcl/openacs-kernel-procs.tcl 4 Mar 2008 13:08:37 -0000 1.10 +++ openacs-4/packages/acs-tcl/tcl/openacs-kernel-procs.tcl 17 Aug 2015 17:45:03 -0000 1.10.10.1 @@ -110,8 +110,7 @@ ns_getcsv $csv_stream headers } - # provide access to errorInfo and errorCode - global errorInfo errorCode + # provide access to errorCode # Upvar Magic! upvar 1 $array_name row_array @@ -143,8 +142,8 @@ # (source: http://wiki.tcl.tk/unless last case) switch -exact -- $errno { 0 {} - 1 {return -code error -errorinfo $errorInfo \ - -errorcode $errorCode $error} + 1 {return -code error -errorinfo $::errorInfo \ + -errorcode $::errorCode $error} 2 {return $error} 3 {break} 4 {} Index: openacs-4/packages/acs-tcl/tcl/parameter-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/parameter-procs.tcl,v diff -u -r1.19 -r1.19.4.1 --- openacs-4/packages/acs-tcl/tcl/parameter-procs.tcl 8 Apr 2013 15:50:25 -0000 1.19 +++ openacs-4/packages/acs-tcl/tcl/parameter-procs.tcl 17 Aug 2015 17:45:04 -0000 1.19.4.1 @@ -98,8 +98,7 @@ set value 0 } } errmsg] } { - global errorInfo - ns_log Error "Parameter $parameter not a boolean:\n$errorInfo" + ns_log Error "Parameter $parameter not a boolean:\n$::errorInfo" set value $default } } @@ -195,8 +194,7 @@ set value 0 } } errmsg] } { - global errorInfo - ns_log Error "Parameter $parameter not a boolean:\n$errorInfo" + ns_log Error "Parameter $parameter not a boolean:\n$::errorInfo" set value $default } } Index: openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl,v diff -u -r1.118 -r1.118.2.1 --- openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 19 Jun 2015 19:52:03 -0000 1.118 +++ openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 17 Aug 2015 17:45:04 -0000 1.118.2.1 @@ -775,13 +775,12 @@ Writes an error to the connection. - @param message The message to write (pulled from $errorInfo if none is specified). + @param message The message to write (pulled from $::errorInfo if none is specified). } { if { ![info exists message] } { - global errorInfo - # We need 'message' to be a copy, because errorInfo will get overridden by some of the template parsing below - set message $errorInfo + # We need 'message' to be a copy, because errorInfo will get overridden by some of the template parsing below + set message $::errorInfo } set error_url "[ad_url][ad_conn url]?[export_entire_form_as_url_vars]" # set error_file [template::util::url_to_file $error_url] Index: openacs-4/packages/acs-tcl/tcl/stack-trace-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/stack-trace-procs.tcl,v diff -u -r1.3 -r1.3.12.1 --- openacs-4/packages/acs-tcl/tcl/stack-trace-procs.tcl 10 Jan 2007 21:22:12 -0000 1.3 +++ openacs-4/packages/acs-tcl/tcl/stack-trace-procs.tcl 17 Aug 2015 17:45:04 -0000 1.3.12.1 @@ -21,9 +21,8 @@ @see ad_get_tcl_call_stack } { uplevel { - global errorInfo - if {$errorInfo ne ""} { - set callStack [list $errorInfo "invoked from within"] + if {$::errorInfo ne ""} { + set callStack [list $::errorInfo "invoked from within"] } else { set callStack {} } 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.140 -r1.140.2.1 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 27 Jun 2015 17:32:40 -0000 1.140 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 17 Aug 2015 17:45:04 -0000 1.140.2.1 @@ -1320,12 +1320,11 @@ execute the on_error block. } { upvar 1 $error_var $error_var - global errorInfo errorCode if { [catch { uplevel $body } $error_var] } { set code [catch {uplevel $on_error} string] # Return out of the caller appropriately. if { $code == 1 } { - return -code error -errorinfo $errorInfo -errorcode $errorCode $string + return -code error -errorinfo $::errorInfo -errorcode $::errorCode $string } elseif { $code == 2 } { return -code return $string } elseif { $code == 3 } { @@ -3580,14 +3579,13 @@ set errinfo {} set errcode {} if { \$errno == 1 } { - global errorInfo errorCode - set errinfo \$errorInfo - set errcode \$errorCode + set errinfo \$::errorInfo + set errcode \$::errorCode } if { \$errno == 1 } { \# This is an error - ns_log Error \"util_background_exec: Error in thread named '$name': \$errorInfo\" + ns_log Error \"util_background_exec: Error in thread named '$name': \$::errorInfo\" } \# errno = 0 (TCL_OK) or 2 (TCL_RETURN) is considered normal, i.e. first elm is true Index: openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl,v diff -u -r1.41.2.1 -r1.41.2.2 --- openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl 17 Aug 2015 16:43:55 -0000 1.41.2.1 +++ openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl 17 Aug 2015 17:45:04 -0000 1.41.2.2 @@ -123,8 +123,7 @@ if { $error_p } { - global errorInfo - error "$error - $errorInfo" + error "$error - $::errorInfo" } } @@ -163,8 +162,7 @@ apm_remove_callback_proc -package_key $package_key -type $callback_type if { $error_p } { - global errorInfo - error "$error - $errorInfo" + error "$error - $::errorInfo" } } @@ -200,8 +198,7 @@ apm_remove_callback_proc -package_key $package_key -type $type if { $error_p } { - global errorInfo - error "$error - $errorInfo" + error "$error - $::errorInfo" } } @@ -304,9 +301,8 @@ set errno [catch { set text_version [ad_html_to_text -- $offending_post] } errmsg] if { ![aa_equals "Does not bomb" $errno 0] } { - global errorInfo - aa_log "errmsg: $errmsg" - aa_log "errorInfo: $errorInfo" + aa_log "errmsg: $errmsg" + aa_log "errorInfo: $::errorInfo" } else { aa_equals "Expected identical result" $text_version $offending_post } @@ -368,9 +364,8 @@ set errno [catch { set text_version [ad_html_to_text -- $offending_post] } errmsg] if { ![aa_equals "Does not bomb" $errno 0] } { - global errorInfo aa_log "errmsg: $errmsg" - aa_log "errorInfo: $errorInfo" + aa_log "errorInfo: $::errorInfo" } else { aa_log "Text version: $text_version" } Index: openacs-4/packages/acs-templating/tcl/filter-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/filter-procs.tcl,v diff -u -r1.16 -r1.16.2.1 --- openacs-4/packages/acs-templating/tcl/filter-procs.tcl 27 Oct 2014 16:40:11 -0000 1.16 +++ openacs-4/packages/acs-templating/tcl/filter-procs.tcl 17 Aug 2015 17:50:27 -0000 1.16.2.1 @@ -77,7 +77,6 @@ regsub {.cmp} $url {} url_stub regexp {^/([^/]*)(.*)} $url_stub all package_key rest set file_stub "$::acs::rootdir/packages/$package_key/www$rest" - set beginTime [clock clicks -milliseconds] set output "
[ns_quotehtml [template::adp_compile -file $file_stub.adp]]
" @@ -86,8 +85,7 @@ ns_log debug "cmp_page_filter: Time elapsed: $timeElapsed" } errMsg] } { - global errorInfo - set output
[ad_quotehtml $errorInfo]
+ set output
[ad_quotehtml $::errorInfo]
} ns_return 200 text/html $output @@ -103,7 +101,6 @@ regsub {.dat} $url {} url_stub regexp {^/([^/]*)(.*)} $url_stub all package_key rest set code_stub "$::acs::rootdir/packages/$package_key/www$rest" - set beginTime [clock clicks -milliseconds] set file_stub [template::get_resource_path]/messages/datasources @@ -114,8 +111,7 @@ ns_log debug " dat_page_filter: Time elapsed: $timeElapsed" } errMsg] } { - global errorInfo - set output
$errorInfo
+ set output
$::errorInfo
} ns_return 200 text/html $output @@ -153,7 +149,6 @@ Return the form data for a request for .frm } { if { [catch { - set beginTime [clock clicks -milliseconds] set output [template::frm_page_handler] @@ -162,8 +157,7 @@ ns_log debug "frm_page_filter: Time elapsed: $timeElapsed" } errMsg] } { - global errorInfo - set output $errorInfo + set output $::errorInfo } ns_return 200 text/html "
[ns_quotehtml $output]
" Index: openacs-4/packages/acs-templating/tcl/query-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/query-procs.tcl,v diff -u -r1.34 -r1.34.2.1 --- openacs-4/packages/acs-templating/tcl/query-procs.tcl 27 Oct 2014 16:40:12 -0000 1.34 +++ openacs-4/packages/acs-templating/tcl/query-procs.tcl 17 Aug 2015 17:50:27 -0000 1.34.2.1 @@ -872,8 +872,7 @@ } 1 { # TCL_ERROR - global errorInfo errorCode - error $error $errorInfo $errorCode + error $error $::errorInfo $::errorCode } 2 { # TCL_RETURN Index: openacs-4/packages/acs-templating/tcl/tag-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/tag-init.tcl,v diff -u -r1.39 -r1.39.2.1 --- openacs-4/packages/acs-templating/tcl/tag-init.tcl 29 Jun 2015 11:03:39 -0000 1.39 +++ openacs-4/packages/acs-templating/tcl/tag-init.tcl 17 Aug 2015 17:50:27 -0000 1.39.2.1 @@ -123,8 +123,7 @@ # We explicitly test for ad_script_abort, so we don't dump that as an error, and don't catch it, either # (We do catch it, but then we re-throw it) template::adp_append_code "if { \[catch { append __adp_output \[$command\] } errmsg\] } {" - template::adp_append_code " global errorInfo errorCode" - template::adp_append_code " if { \[lindex \$errorCode 0\] eq \"AD\" && \[lindex \$errorCode 1\] eq \"EXCEPTION\" && \[lindex \$errorCode 2\] eq \"ad_script_abort\" } {" + template::adp_append_code " if { \[lindex \$::errorCode 0\] eq \"AD\" && \[lindex \$::errorCode 1\] eq \"EXCEPTION\" && \[lindex \$::errorCode 2\] eq \"ad_script_abort\" } {" template::adp_append_code " ad_script_abort" template::adp_append_code " } else {" template::adp_append_code " append __adp_output \"Error in include template \\\"\[template::util::url_to_file \"$src\" \"\$__adp_stub\"\]\\\": \[ns_quotehtml \$errmsg\]\"" @@ -134,10 +133,10 @@ template::adp_append_code " && \[info exists ::ds_collection_enabled_p\] } {" template::adp_append_code " set __include_errors {}" template::adp_append_code " ns_cache get ds_page_bits \[ad_conn request\]:error __include_errors" - template::adp_append_code " ns_cache set ds_page_bits \[ad_conn request\]:error \[lappend __include_errors \[list \"$src\" \$errorInfo\]\]" + template::adp_append_code " ns_cache set ds_page_bits \[ad_conn request\]:error \[lappend __include_errors \[list \"$src\" \$::errorInfo\]\]" template::adp_append_code " }" } - template::adp_append_code " ns_log Error \"Error in include template \\\"\[template::util::url_to_file \"$src\" \"\$__adp_stub\"\]\\\": \$errmsg\n\$errorInfo\"" + template::adp_append_code " ns_log Error \"Error in include template \\\"\[template::util::url_to_file \"$src\" \"\$__adp_stub\"\]\\\": \$errmsg\n\$::errorInfo\"" template::adp_append_code " }" template::adp_append_code "}" @@ -662,9 +661,8 @@ # Finally, we pop the output off of the __adp_include_optional_output stack. template::adp_append_code "if { \[catch { ad_try { lappend __adp_include_optional_output \[$command\] } ad_script_abort val { } } errmsg\] } {" - template::adp_append_code " global errorInfo" template::adp_append_code " append __adp_output \"Error in include template \\\"\[template::util::url_to_file \"$src\" \"\$__adp_stub\"\]\\\": \[ns_quotehtml \$errmsg\]\"" - template::adp_append_code " ns_log Error \"Error in include template \\\"\[template::util::url_to_file \"$src\" \"\$__adp_stub\"\]\\\": \$errmsg\n\$errorInfo\"" + template::adp_append_code " ns_log Error \"Error in include template \\\"\[template::util::url_to_file \"$src\" \"\$__adp_stub\"\]\\\": \$errmsg\n\$::errorInfo\"" template::adp_append_code "} else {" template::adp_append_code "if { \[string trim \[lindex \$__adp_include_optional_output end\]\] ne {} } {"