Index: openacs-4/packages/acs-core-docs/www/xml/kernel/ext-auth-design.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/kernel/ext-auth-design.xml,v diff -u -r1.13.2.3 -r1.13.2.4 --- openacs-4/packages/acs-core-docs/www/xml/kernel/ext-auth-design.xml 17 Dec 2019 16:37:50 -0000 1.13.2.3 +++ openacs-4/packages/acs-core-docs/www/xml/kernel/ext-auth-design.xml 17 Dec 2019 16:53:18 -0000 1.13.2.4 @@ -1242,13 +1242,13 @@ }] # Send email verification email to user set confirmation_url [export_vars -base [ad_url]/register/email-confirm { row_id }] - with_catch errmsg { + ::try { acs_mail_lite::send \ -to_addr $email \ -from_addr $notification_address \ -subject "[_ acs-subsite.lt_Welcome_to_system_nam]" \ -body "[_ acs-subsite.lt_To_confirm_your_regis]" - } { + } on error {errmsg} { ns_returnerror "500" "$errmsg" ns_log Warning "Error sending email verification email to $email. Error: $errmsg" } @@ -1258,26 +1258,26 @@ # Send password/confirmail email to user if { [parameter::get -parameter RegistrationProvidesRandomPasswordP -default 0] || \ [parameter::get -parameter EmailRegistrationConfirmationToUserP -default 1] } { - with_catch errmsg { + ::try { acs_mail_lite::send \ -to_addr $email \ -from_addr $notification_address \ -subject "[_ acs-subsite.lt_Welcome_to_system_nam]" \ -body "[_ acs-subsite.lt_Thank_you_for_visitin]" - } { + } on error {errmsg} { ns_returnerror "500" "$errmsg" ns_log Warning "Error sending registration confirmation to $email. Error: $errmsg" } } # Notify admin on new registration if {[parameter::get -parameter NotifyAdminOfNewRegistrationsP -default 0]} { - with_catch errmsg { + ::try { acs_mail_lite::send \ -to_addr $notification_address \ -from_addr $email \ -subject "[_ acs-subsite.lt_New_registration_at_s]" \ -body "[_ acs-subsite.lt_first_names_last_name]" - } { + } on error {errmsg} { ns_returnerror "500" "$errmsg" ns_log Warning "Error sending admin notification to $notification_address. Error: $errmsg" } 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.189.2.45 -r1.189.2.46 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 16 Dec 2019 17:14:38 -0000 1.189.2.45 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 17 Dec 2019 16:53:18 -0000 1.189.2.46 @@ -1228,10 +1228,17 @@ return $url } -ad_proc -public with_catch {error_var body on_error} { +ad_proc -deprecated with_catch {error_var body on_error} { execute code in body with the catch errorMessage in error_var and if there is a non-zero return code from body execute the on_error block. + + DEPRECATED: does not comply with OpenACS naming convention and can + be replaced with better api such as ad_try or native Tcl + constructs such as ::try (8.6) + + @see try + @see ad_try } { upvar 1 $error_var $error_var if { [catch { uplevel $body } $error_var] } { @@ -3337,7 +3344,7 @@ return [string range [sec_random_token] 0 $length-1] } -ad_proc -public with_finally { +ad_proc -deprecated with_finally { -code:required -finally:required } { @@ -3349,6 +3356,13 @@ @param code Code to be executed that could throw and error @param finally Cleanup code to be executed even if an error occurs + + DEPRECATED: does not comply with OpenACS naming convention and can + be replaced with better api such as ad_try or native Tcl + constructs such as ::try (8.6) + + @see try + @see ad_try } { # Execute CODE. Index: openacs-4/packages/assessment/www/asm-admin/export/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/export/index.vuh,v diff -u -r1.12.2.1 -r1.12.2.2 --- openacs-4/packages/assessment/www/asm-admin/export/index.vuh 17 Dec 2019 16:46:46 -0000 1.12.2.1 +++ openacs-4/packages/assessment/www/asm-admin/export/index.vuh 17 Dec 2019 16:53:18 -0000 1.12.2.2 @@ -773,13 +773,8 @@ set cmd "zip -r -9 -X '$out_file' *" # create the archive -with_catch errmsg { - # TODO SECURITY DONT USE THE SHELL - exec bash -c "cd '$in_path'; $cmd; cd -" -} { - # some day we'll do something useful here - error $errmsg -} +# TODO SECURITY DONT USE THE SHELL +exec bash -c "cd '$in_path'; $cmd; cd -" # return the archive to the connection. ns_returnfile 200 [ns_guesstype $out_file] $out_file Index: openacs-4/packages/evaluation/www/admin/evaluations/download-archive/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/download-archive/index.vuh,v diff -u -r1.5.2.1 -r1.5.2.2 --- openacs-4/packages/evaluation/www/admin/evaluations/download-archive/index.vuh 17 Dec 2019 16:49:01 -0000 1.5.2.1 +++ openacs-4/packages/evaluation/www/admin/evaluations/download-archive/index.vuh 17 Dec 2019 16:53:18 -0000 1.5.2.2 @@ -49,11 +49,7 @@ set cmd [evaluation::get_archive_command -in_file $file_name -out_file $out_file] # create the archive -with_catch errmsg { - exec bash -c "cd $in_path; $cmd; cd -" -} { - error $errmsg -} +exec bash -c "cd $in_path; $cmd; cd -" # return the archive to the connection. ns_returnfile 200 application/octet-stream $out_file Index: openacs-4/packages/file-storage/www/download-archive/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/download-archive/index.vuh,v diff -u -r1.8 -r1.8.2.1 --- openacs-4/packages/file-storage/www/download-archive/index.vuh 7 Aug 2017 23:48:11 -0000 1.8 +++ openacs-4/packages/file-storage/www/download-archive/index.vuh 17 Dec 2019 16:53:18 -0000 1.8.2.1 @@ -58,12 +58,7 @@ set cmd [fs::get_archive_command -in_file $file_name -out_file $out_file] # create the archive -with_catch errmsg { - exec bash -c "cd $in_path; $cmd; cd -" -} { - # some day we'll do something useful here - error $errmsg -} +exec bash -c "cd $in_path; $cmd; cd -" # return the archive to the connection. ns_returnfile 200 application/octet-stream $out_file