Index: openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl,v diff -u -r1.31.2.3 -r1.31.2.4 --- openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl 18 Sep 2015 07:33:48 -0000 1.31.2.3 +++ openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl 5 Jan 2016 17:24:43 -0000 1.31.2.4 @@ -23,10 +23,9 @@ } ad_proc -private apm_attribute_value { - { - -default "" - } - element attribute } { + {-default ""} + element attribute +} { Parses the XML element to return the value for the specified attribute. @@ -238,7 +237,11 @@ set xml_data [read $file] close $file - set tree [xml_parse -persist $xml_data] + if {[catch {set tree [xml_parse -persist $xml_data]} errorMsg]} { + ns_log error "parsing XML file $path lead to error: $errorMsg" + return -code error "file: $path\n$errorMsg" + } + set root_node [xml_doc_get_first_node $tree] apm_log APMDebug "XML: root node is [xml_node_get_name $root_node]" set package $root_node