Index: openacs-4/packages/acs-tcl/tcl/xml-1-dom-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/xml-1-dom-procs.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-tcl/tcl/xml-1-dom-procs.tcl 1 Oct 2017 12:16:05 -0000 1.6 +++ openacs-4/packages/acs-tcl/tcl/xml-1-dom-procs.tcl 17 Jan 2018 21:45:20 -0000 1.7 @@ -165,7 +165,7 @@ 1 { # Use array name provided. Should check that it is safe. set name [lindex $args 0] - catch {unset $name} + unset -nocomplain $name } default { return -code error "wrong number of arguments" @@ -211,16 +211,17 @@ ## upvar #0 $node(docArray) docArray for {set i 0} {$i < $docArray(counter)} {incr i} { - catch {unset ${docArrayName}var$i} - catch {unset ${docArrayName}arr$i} + unset -nocomplain ${docArrayName}var$i + unset -nocomplain ${docArrayName}arr$i } ## ## Then release the main document array ## - if {[catch {unset $node(docArray)}]} { + if {![info exists $node(docArray)]} { return -code error "unable to destroy document" } + unset -nocomplain $node(docArray) return {} @@ -305,7 +306,7 @@ $parser configure -final true } elseif {[catch {$parser parse [lindex $args 0]} err]} { catch {rename $parser {}} - catch {unset $state} + unset -nocomplain $state return -code error $err } @@ -1248,7 +1249,7 @@ } upvar #0 $node(element:attributeList) attrList - catch {unset attrList([lindex $args 0])} + unset -nocomplain attrList([lindex $args 0]) } @@ -1307,7 +1308,7 @@ if {$node(node:nodeType) ne "documentFragment" } { foreach child [set $node(node:childNodes)] { - catch {unset childNode} + unset -nocomplain childNode array set childNode [set $child] if {$childNode(node:nodeType) eq "element" && [GetField childNode(node:nodeName)] eq $name @@ -1317,7 +1318,7 @@ } } elseif {[llength $node(document:documentElement)]} { # Document Element must exist and must be an element type node - catch {unset childNode} + unset -nocomplain childNode array set childNode [set $node(document:documentElement)] if {$childNode(node:nodeName) eq $name } { set result $node(document:documentElement) @@ -1362,7 +1363,7 @@ PutHandle $textNode text } else { set textNode $n - catch {unset text} + unset -nocomplain text array set text [array get child] } } @@ -1598,7 +1599,7 @@ set result {} foreach childToken [set $node(node:childNodes)] { - catch {unset child} + unset -nocomplain child array set child [set $childToken] append result [eval [list Serialize:$child(node:nodeType) $childToken] $args] }