Index: openacs-4/packages/acs-subsite/tcl/relation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/relation-procs.tcl,v diff -u -r1.17 -r1.18 --- openacs-4/packages/acs-subsite/tcl/relation-procs.tcl 7 Aug 2017 23:47:58 -0000 1.17 +++ openacs-4/packages/acs-subsite/tcl/relation-procs.tcl 21 Jan 2018 00:35:29 -0000 1.18 @@ -358,7 +358,10 @@ } { if {$object_id_one eq ""} { if {$object_id_two eq ""} { - ad_return_error "[_ acs-subsite.Missing_argument]" "[_ acs-subsite.lt_You_have_to_provide_a]" + ad_return_error \ + [_ acs-subsite.Missing_argument] \ + [_ acs-subsite.lt_You_have_to_provide_a] + ad_script_abort } else { return [relation::get_object_one -object_id_two $object_id_two -rel_type $rel_type -multiple] } Index: openacs-4/packages/acs-subsite/www/admin/applications/application-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/applications/application-add.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/acs-subsite/www/admin/applications/application-add.tcl 7 Aug 2017 23:47:58 -0000 1.13 +++ openacs-4/packages/acs-subsite/www/admin/applications/application-add.tcl 21 Jan 2018 00:35:29 -0000 1.14 @@ -80,17 +80,22 @@ form set_error application folder "This folder name is already used" break } + } -new_data { - if { [catch { + ad_try { site_node::instantiate_and_mount \ -parent_node_id [ad_conn node_id] \ -node_name $folder \ -package_name $instance_name \ -package_key $package_key - } errmsg] } { - ns_log Error "Error creating application: $errmsg\n$::errorInfo" - ad_return_error "Problem Creating Application" "We had a problem creating the application." + } on error {errorMsg} { + ad_log warning "Problem creating application: $errorMsg" + ad_return_error \ + "Problem Creating Application" \ + "We had a problem creating the application." + ad_script_abort } + } -edit_data { # this is where we would rename ... @@ -102,6 +107,7 @@ site_node::rename -node_id $node_id -name $folder } + } -after_submit { ad_returnredirect $return_url ad_script_abort Index: openacs-4/packages/acs-subsite/www/admin/group-types/change-join-policy-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/group-types/change-join-policy-2.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-subsite/www/admin/group-types/change-join-policy-2.tcl 19 Jan 2018 14:09:48 -0000 1.6 +++ openacs-4/packages/acs-subsite/www/admin/group-types/change-join-policy-2.tcl 21 Jan 2018 00:35:29 -0000 1.7 @@ -20,12 +20,17 @@ where t.object_type = :group_type and t.object_type = gt.group_type(+) }] } { - ad_return_error "Group type doesn't exist" "Group type \"$group_type\" doesn't exist" - return + ad_return_error \ + "Group type doesn't exist" \ + "Group type \"$group_type\" doesn't exist" + ad_script_abort } if {$dynamic_p != "t" } { - ad_return_error "Cannot administer group type" "Group type \"$group_type\" can only be administered by programmers" + ad_return_error \ + "Cannot administer group type" \ + "Group type \"$group_type\" can only be administered by programmers" + ad_script_abort } Index: openacs-4/packages/acs-subsite/www/admin/group-types/change-join-policy.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/group-types/change-join-policy.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-subsite/www/admin/group-types/change-join-policy.tcl 7 Aug 2017 23:47:58 -0000 1.7 +++ openacs-4/packages/acs-subsite/www/admin/group-types/change-join-policy.tcl 21 Jan 2018 00:35:29 -0000 1.8 @@ -28,17 +28,21 @@ if { ![db_0or1row select_pretty_name {}] } { ad_return_error "Group type doesn't exist" "Group type \"$group_type\" doesn't exist" - return + errorMsgad_script_abort } if {$dynamic_p != "t" } { - ad_return_error "Cannot administer group type" "Group type \"$group_type\" can only be administered by programmers" + ad_return_error \ + "Cannot administer group type" \ + "Group type \"$group_type\" can only be administered by programmers" + ad_script_abort } set possible_join_policies [list open "needs approval" closed] set QQreturn_url [ns_quotehtml $return_url] set QQgroup_type [ns_quotehtml $group_type] ad_return_template + # Local variables: # mode: tcl # tcl-indent-level: 4 Index: openacs-4/packages/acs-subsite/www/admin/group-types/delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/group-types/delete.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-subsite/www/admin/group-types/delete.tcl 7 Aug 2017 23:47:58 -0000 1.6 +++ openacs-4/packages/acs-subsite/www/admin/group-types/delete.tcl 21 Jan 2018 00:35:29 -0000 1.7 @@ -38,8 +38,10 @@ from acs_object_types t where t.object_type = :group_type }] } { - ad_return_error "Group type doesn't exist" "Group type \"$group_type\" doesn't exist" - return + ad_return_error \ + "Group type doesn't exist" \ + "Group type \"$group_type\" doesn't exist" + ad_script_abort } set subtypes_exist_p [db_string number_subtypes {}] Index: openacs-4/packages/acs-subsite/www/admin/group-types/one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/group-types/one.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-subsite/www/admin/group-types/one.tcl 7 Aug 2017 23:47:58 -0000 1.8 +++ openacs-4/packages/acs-subsite/www/admin/group-types/one.tcl 21 Jan 2018 00:35:29 -0000 1.9 @@ -30,8 +30,10 @@ set package_id [ad_conn package_id] if { ![db_0or1row select_pretty_name {}] } { - ad_return_error "Group type doesn't exist" "Group type \"$group_type\" doesn't exist" - return + ad_return_error \ + "Group type doesn't exist" \ + "Group type \"$group_type\" doesn't exist" + ad_script_abort } set doc(title) [_ acs-subsite.Details_for__group_type_pretty_name] Index: openacs-4/packages/acs-subsite/www/admin/group-types/rel-type-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/group-types/rel-type-add-2.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-subsite/www/admin/group-types/rel-type-add-2.tcl 19 Jan 2018 14:09:48 -0000 1.7 +++ openacs-4/packages/acs-subsite/www/admin/group-types/rel-type-add-2.tcl 21 Jan 2018 00:35:29 -0000 1.8 @@ -35,8 +35,10 @@ } } err_msg] } { # Does this pair already exists? if { ![db_string exists_p {select count(*) from group_type_rels where group_type = :group_type and rel_type = :rel_type}] } { - ad_return_error "Error inserting to database" $err_msg - return + ad_return_error \ + "Error inserting to database" \ + $err_msg + ad_script_abort } } Index: openacs-4/packages/acs-subsite/www/admin/group-types/rel-type-remove.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/group-types/rel-type-remove.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-subsite/www/admin/group-types/rel-type-remove.tcl 7 Aug 2017 23:47:58 -0000 1.6 +++ openacs-4/packages/acs-subsite/www/admin/group-types/rel-type-remove.tcl 21 Jan 2018 00:35:29 -0000 1.7 @@ -26,12 +26,17 @@ and t.object_type = g.rel_type and t2.object_type = g.group_type }] } { - ad_return_error "Relation already removed." "Please back up and reload" - return + ad_return_error \ + "Relation already removed." \ + "Please back up and reload" + ad_script_abort } set export_vars [export_vars -form {group_rel_type_id return_url}] -set context [list [list "[ad_conn package_url]admin/group-types/" "Group types"] [list [export_vars -base one {group_type}] "One type"] "Remove relation type"] +set context [list \ + [list "[ad_conn package_url]admin/group-types/" "Group types"] \ + [list [export_vars -base one {group_type}] "One type"] \ + "Remove relation type"] ad_return_template Index: openacs-4/packages/acs-subsite/www/admin/groups/rel-type-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/groups/rel-type-add-2.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-subsite/www/admin/groups/rel-type-add-2.tcl 19 Jan 2018 14:09:48 -0000 1.8 +++ openacs-4/packages/acs-subsite/www/admin/groups/rel-type-add-2.tcl 21 Jan 2018 00:35:29 -0000 1.9 @@ -40,7 +40,7 @@ # Does this pair already exists? if { ![db_string exists_p {}] } { ad_return_error "Error inserting to database" $err_msg - return + ad_script_abort } } Index: openacs-4/packages/acs-subsite/www/admin/groups/rel-type-remove.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/groups/rel-type-remove.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-subsite/www/admin/groups/rel-type-remove.tcl 7 Aug 2017 23:47:58 -0000 1.6 +++ openacs-4/packages/acs-subsite/www/admin/groups/rel-type-remove.tcl 21 Jan 2018 00:35:29 -0000 1.7 @@ -21,13 +21,16 @@ if { ![db_0or1row select_info {}] } { ad_return_error "Relation already removed." "Please back up and reload" - return + ad_script_abort } permission::require_permission -object_id $group_id -privilege admin set export_vars [export_vars -form {group_rel_id return_url}] -set context [list [list "[ad_conn package_url]admin/groups/" "Groups"] [list [export_vars -base one {group_id}] "One group"] "Remove relation type"] +set context [list \ + [list "[ad_conn package_url]admin/groups/" "Groups"] \ + [list [export_vars -base one {group_id}] "One group"] \ + "Remove relation type"] ad_return_template Index: openacs-4/packages/acs-subsite/www/admin/rel-segments/one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/rel-segments/one.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-subsite/www/admin/rel-segments/one.tcl 7 Aug 2017 23:47:58 -0000 1.7 +++ openacs-4/packages/acs-subsite/www/admin/rel-segments/one.tcl 21 Jan 2018 00:35:29 -0000 1.8 @@ -31,8 +31,10 @@ set context [list [list "./" "Relational segments"] "One segment"] if { ![db_0or1row select_segment_properties {} -column_array props] } { - ad_return_error "Segment does not exist" "Segment $segment_id does not exist" - return + ad_return_error \ + "Segment does not exist" \ + "Segment $segment_id does not exist" + ad_script_abort } set props(role_pretty_plural) [lang::util::localize $props(role_pretty_plural)] Index: openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/new.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/new.tcl 7 Aug 2017 23:47:58 -0000 1.7 +++ openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/new.tcl 21 Jan 2018 00:35:29 -0000 1.8 @@ -81,8 +81,9 @@ }] if { [llength $segment_list] == 0 } { - ad_return_complaint 1 "
$errmsg" - return + ad_return_error \ + "Error creating the constraint" \ + "We got the following error while trying to create the constraint:
$errmsg" + ad_script_abort } } if { $ctr > 0 } { # show the user the erroneous relations, then abort ad_return_template violations - return + ad_script_abort } if { $return_url eq "" } { set return_url "../one?segment_id=$rel_segment" Index: openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/one.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/one.tcl 7 Aug 2017 23:47:58 -0000 1.5 +++ openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/one.tcl 21 Jan 2018 00:35:29 -0000 1.6 @@ -40,8 +40,10 @@ # rel_segment if { ![db_0or1row select_constraint_properties {} -column_array props] } { - ad_return_error "Error" "Constraint #$constraint_id could not be found or is out of the scope of this subsite." - return + ad_return_error \ + "Error" \ + "Constraint #$constraint_id could not be found or is out of the scope of this subsite." + ad_script_abort } set segment_id $props(segment_id) Index: openacs-4/packages/acs-subsite/www/admin/rel-types/mapping-remove.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/rel-types/mapping-remove.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-subsite/www/admin/rel-types/mapping-remove.tcl 7 Aug 2017 23:47:58 -0000 1.5 +++ openacs-4/packages/acs-subsite/www/admin/rel-types/mapping-remove.tcl 21 Jan 2018 00:35:29 -0000 1.6 @@ -27,8 +27,10 @@ and t.object_type = g.rel_type and t2.object_type = g.group_type }] } { - ad_return_error "Relation already removed." "Please back up and reload" - return + ad_return_error \ + "Relation already removed." \ + "Please back up and reload" + ad_script_abort } set export_vars [export_vars -form {group_rel_type_id return_url}] Index: openacs-4/packages/acs-subsite/www/admin/rel-types/one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/rel-types/one.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-subsite/www/admin/rel-types/one.tcl 7 Aug 2017 23:47:58 -0000 1.4 +++ openacs-4/packages/acs-subsite/www/admin/rel-types/one.tcl 21 Jan 2018 00:35:29 -0000 1.5 @@ -35,8 +35,10 @@ from acs_object_types t where t.object_type = :rel_type }] } { - ad_return_error "Relationship type doesn't exist" "Relationship type \"$rel_type\" doesn't exist" - return + ad_return_error \ + "Relationship type doesn't exist" \ + "Relationship type \"$rel_type\" doesn't exist" + ad_script_abort } db_1row select_rel_type_properties {} -column_array properties Index: openacs-4/packages/acs-subsite/www/admin/rel-types/rels-list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/rel-types/rels-list.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-subsite/www/admin/rel-types/rels-list.tcl 7 Aug 2017 23:47:58 -0000 1.5 +++ openacs-4/packages/acs-subsite/www/admin/rel-types/rels-list.tcl 21 Jan 2018 00:35:29 -0000 1.6 @@ -26,8 +26,10 @@ from acs_object_types t where t.object_type = :rel_type }] } { - ad_return_error "Relationship type doesn't exist" "Relationship type \"$rel_type\" doesn't exist" - return + ad_return_error \ + "Relationship type doesn't exist" \ + "Relationship type \"$rel_type\" doesn't exist" + ad_script_abort } db_multirow rels rels_select {} Index: openacs-4/packages/acs-subsite/www/admin/users/new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/users/new.tcl,v diff -u -r1.19 -r1.20 --- openacs-4/packages/acs-subsite/www/admin/users/new.tcl 17 Dec 2017 18:36:06 -0000 1.19 +++ openacs-4/packages/acs-subsite/www/admin/users/new.tcl 21 Jan 2018 00:35:29 -0000 1.20 @@ -189,7 +189,8 @@ } } on_error { - ad_return_error "User Creation Failed" "We were unable to create the user record in the database." + ad_return_error "User Creation Failed" "We were unable to create the user record in the database." + ad_script_abort } } @@ -280,8 +281,6 @@ ns_log Warning "Error sending registration confirmation to $email in acs-subsite/www/admin/users/new Error: $errmsg" } } - - } ad_script_abort Index: openacs-4/packages/acs-subsite/www/members/user-batch-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/members/user-batch-add-2.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-subsite/www/members/user-batch-add-2.tcl 7 Aug 2017 23:47:59 -0000 1.7 +++ openacs-4/packages/acs-subsite/www/members/user-batch-add-2.tcl 21 Jan 2018 00:35:29 -0000 1.8 @@ -84,7 +84,9 @@ # if anything goes wrong here, stop the whole process if { !$user_id } { - ad_return_error "Insert Failed" "We were unable to create a user record for ($row)." + ad_return_error \ + "Insert Failed" \ + "We were unable to create a user record for ($row)." ad_script_abort } @@ -100,11 +102,13 @@ } if {[catch {acs_mail_lite::send -send_immediately -to_addr $email -from_addr $from -subject $subject -body $sub_message} errmsg]} { - ad_return_error "Mail Failed" "
The system was unable to send email. Please notify the user personally. This problem is probably caused by a misconfiguration of your email system. Here is the error:
+ ad_return_error \ + "Mail Failed" \ + "The system was unable to send email. Please notify the user personally. This problem is probably caused by a misconfiguration of your email system. Here is the error:
[ns_quotehtml $errmsg]