diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-04-10 11:55:58 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-04-10 12:02:06 +0200 |
commit | 73afca6207f2153e8e16de6f21a314e12b324776 (patch) | |
tree | 3dba4709d7f6bee568447d078aa2b27868266a71 /apps/files_sharing/lib | |
parent | 43b503641c9f3cc705f4a5c318c4122d00f8940a (diff) | |
download | nextcloud-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.php | 2 |
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(); |