# HG changeset patch # User Charlie Root # Date 1559939735 14400 # Node ID 72708ec9c0e690633a04f958806b7294a1ead913 # Parent a04fc91bbd95394365990262de2a74e43d6fbabd debug bad XML error diff -r a04fc91bbd95 -r 72708ec9c0e6 xml/doAmazonRequest.php --- a/xml/doAmazonRequest.php Fri Jun 07 16:35:16 2019 -0400 +++ b/xml/doAmazonRequest.php Fri Jun 07 16:35:35 2019 -0400 @@ -50,7 +50,13 @@ dl("nai2: $gotit ".strlen($output)."\n"); curl_close($crl); $mm=array(); - $xml = new SimpleXMLElement($output); + try { + $xml = new SimpleXMLElement($output); + } + catch (Exception $e) { + dl("dar: bad output:\n$output\n"); + throw $e; + } if (preg_match("//",$output,$mm)) { $resName=$xml->getName(); $code=$xml->Error->Code;