diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2014-11-05 11:51:21 +0100 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2014-11-05 11:51:21 +0100 |
| commit | fc9ddff30bafd071990dfb95c9a8520b457da2e9 (patch) | |
| tree | 1cd3fdeb39c58050164b7e94d67e078199c06833 /src/phorkie | |
| parent | abf08ecdb046202de8b5abf0392b4b76a5d0f89a (diff) | |
| download | phorkie-fc9ddff30bafd071990dfb95c9a8520b457da2e9.tar.gz phorkie-fc9ddff30bafd071990dfb95c9a8520b457da2e9.zip | |
show url and HTTP method in exception
Diffstat (limited to 'src/phorkie')
| -rw-r--r-- | src/phorkie/Database/Adapter/Elasticsearch/HTTPRequest.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/phorkie/Database/Adapter/Elasticsearch/HTTPRequest.php b/src/phorkie/Database/Adapter/Elasticsearch/HTTPRequest.php index 4cc02d6..24487bc 100644 --- a/src/phorkie/Database/Adapter/Elasticsearch/HTTPRequest.php +++ b/src/phorkie/Database/Adapter/Elasticsearch/HTTPRequest.php @@ -22,9 +22,11 @@ class Database_Adapter_Elasticsearch_HTTPRequest extends \HTTP_Request2 } else { $error = $res->getBody(); } + 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 ); } |
