summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-04-10 11:55:58 +0200
committerVincent Petry <pvince81@owncloud.com>2015-04-10 12:02:06 +0200
commit73afca6207f2153e8e16de6f21a314e12b324776 (patch)
tree3dba4709d7f6bee568447d078aa2b27868266a71 /apps/files_sharing/lib
parent43b503641c9f3cc705f4a5c318c4122d00f8940a (diff)
downloadnextcloud-server-73afca6207f2153e8e16de6f21a314e12b324776.tar.gz
nextcloud-server-73afca6207f2153e8e16de6f21a314e12b324776.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/lib')
-rw-r--r--apps/files_sharing/lib/external/storage.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php
index 0238f5ad4af..1dfef21ca75 100644
--- a/apps/files_sharing/lib/external/storage.php
+++ b/apps/files_sharing/lib/external/storage.php
@@ -199,6 +199,8 @@ class Storage extends DAV implements ISharedStorage {
$this->manager->removeShare($this->mountPoint);
$this->manager->getMountManager()->removeMount($this->mountPoint);
throw new StorageInvalidException();
+ } catch (\GuzzleHttp\Exception\ConnectException $e) {
+ throw new StorageNotAvailableException();
} catch (\GuzzleHttp\Exception\RequestException $e) {
if ($e->getCode() === 503) {
throw new StorageNotAvailableException();