changeset 34:5cae8d572998

more error info
author Charlie Root
date Fri, 04 Jan 2019 12:53:10 -0500
parents c9d9b76ecbf9
children 86f79bc1d142
files php/read/getBookDetails.php
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/php/read/getBookDetails.php	Fri Jan 04 11:35:59 2019 -0500
+++ b/php/read/getBookDetails.php	Fri Jan 04 12:53:10 2019 -0500
@@ -234,8 +234,12 @@
 		  $xml = new SimpleXMLElement($out);	
 		  $resName=$xml->getName();
 		  $code=$xml->Error->Code;
-		  if (!$code) {
+		  if ($code) {
+		    $message=$xml->Error->Message;
+		  }
+		  else {
 		    $code=$xml->Items->Request->Errors->Error->Code;
+		    $message=$xml->Items->Request->Errors->Error->Message;
 		  }
 		  $requestIP = $_SERVER['REMOTE_ADDR'];
 		  file_put_contents('/var/ywww/debug/phpDebug',"Losing gBD: ".$mm[0].", $resName, $code, $requestIP\n",FILE_APPEND);
@@ -244,8 +248,7 @@
 		    // principled solution in place
 		  }
 		  else {
-		    file_put_contents('/var/ywww/debug/phpDebug',"parms $url\nbd: ".
-				      print_r($parameters,TRUE)."\n",FILE_APPEND);
+		    file_put_contents('/var/ywww/debug/phpDebug',"message: $message\n",FILE_APPEND);
 		    if ($code=="") {
 		      file_put_contents('/var/ywww/debug/phpDebug',"error elt:\n$out\n",FILE_APPEND);
 		    }