Mercurial > hg > ywww
changeset 55:72708ec9c0e6
debug bad XML error
author | Charlie Root |
---|---|
date | Fri, 07 Jun 2019 16:35:35 -0400 |
parents | a04fc91bbd95 |
children | 5f772caee9a7 |
files | xml/doAmazonRequest.php |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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("/<Error>/",$output,$mm)) { $resName=$xml->getName(); $code=$xml->Error->Code;