diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-04-10 11:55:58 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-04-10 13:04:24 +0200 |
commit | 486e7e5ed12c3353ff7e5779cf5da3243feb8b10 (patch) | |
tree | f55c6d2fe4480ecab7ba5d88773e6d8b7ce48ea4 /apps/files_sharing | |
parent | 3f6db4c1ab1dfff61f27101219baf5f88a114409 (diff) | |
download | nextcloud-server-486e7e5ed12c3353ff7e5779cf5da3243feb8b10.tar.gz nextcloud-server-486e7e5ed12c3353ff7e5779cf5da3243feb8b10.zip |
Catch more exceptions when connecting to remote DAV server
Added InvalidArgumentException to catch HTML parsing errors when XML was
expected.
Made convertSabreException more generic to be able to handle more
exception cases.
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/external/storage.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php index 648376e8cb5..449d7a7eff5 100644 --- a/apps/files_sharing/lib/external/storage.php +++ b/apps/files_sharing/lib/external/storage.php @@ -237,7 +237,8 @@ class Storage extends DAV implements ISharedStorage { $errorMessage = curl_error($ch); curl_close($ch); if (!empty($errorMessage)) { - throw new \Exception($errorMessage); + \OCP\Util::writeLog('files_sharing', 'Error getting remote share info: ' . $errorMessage, \OCP\Util::ERROR); + throw new StorageNotAvailableException($errorMessage); } switch ($status) { |