[Pkg-owncloud-commits] [php-sabredav] 62/80: A better exception for Client::propFind
David Prévot
taffit at moszumanska.debian.org
Thu Jan 7 02:56:37 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabredav.
commit 290f1437dda482ac5fa0f9085e968ee780fa025d
Author: Evert Pot <me at evertpot.com>
Date: Mon Jan 4 23:24:50 2016 -0500
A better exception for Client::propFind
We're now using `Sabre\HTTP\ClientHttpException` instead of
`Sabre\DAV\Exception`.
Fixes #608
---
lib/DAV/Client.php | 2 +-
tests/Sabre/DAV/ClientTest.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/DAV/Client.php b/lib/DAV/Client.php
index bcedbd7..287e6df 100644
--- a/lib/DAV/Client.php
+++ b/lib/DAV/Client.php
@@ -228,7 +228,7 @@ class Client extends HTTP\Client {
$response = $this->send($request);
if ((int)$response->getStatus() >= 400) {
- throw new Exception('HTTP error: ' . $response->getStatus());
+ throw new \Sabre\HTTP\ClientHttpException($response);
}
$result = $this->parseMultiStatus($response->getBodyAsString());
diff --git a/tests/Sabre/DAV/ClientTest.php b/tests/Sabre/DAV/ClientTest.php
index fe71511..b83787c 100644
--- a/tests/Sabre/DAV/ClientTest.php
+++ b/tests/Sabre/DAV/ClientTest.php
@@ -149,7 +149,7 @@ XML;
}
/**
- * @expectedException \Sabre\DAV\Exception
+ * @expectedException \Sabre\HTTP\ClientHttpException
*/
function testPropFindError() {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list