show url and HTTP method in exception
authorChristian Weiske <cweiske@cweiske.de>
Wed, 5 Nov 2014 10:51:21 +0000 (11:51 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Wed, 5 Nov 2014 10:51:21 +0000 (11:51 +0100)
src/phorkie/Database/Adapter/Elasticsearch/HTTPRequest.php

index 4cc02d6fe6581746e1a62124fd038d46f17af09e..24487bcd554d21035154e383f4d369a68987e67b 100644 (file)
@@ -22,9 +22,11 @@ class Database_Adapter_Elasticsearch_HTTPRequest extends \HTTP_Request2
         } else {
             $error = $res->getBody();
         }
         } else {
             $error = $res->getBody();
         }
+
         throw new Exception(
         throw new Exception(
-            'Error in elasticsearch communication'
-            . '(status code ' . $res->getStatus() . '): '
+            'Error in elasticsearch communication at '
+            . $this->getMethod() . ' ' . (string) $this->getUrl()
+            . ' (status code ' . $res->getStatus() . '): '
             . $error
         );
     }
             . $error
         );
     }