summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-09-01 15:34:32 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-09-04 11:54:13 +0200
commit68ee79b5957d31d6b6e1dd32dea757c8e08024f1 (patch)
treef88b11ce538e07996549fd9bff861655df7fc5fd /apps/files_external
parent442d4ed24a713cf5f9fc582ca284b0b740940c6b (diff)
downloadnextcloud-server-68ee79b5957d31d6b6e1dd32dea757c8e08024f1.tar.gz
nextcloud-server-68ee79b5957d31d6b6e1dd32dea757c8e08024f1.zip
set the exception for failedstorage
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/Lib/Backend/InvalidBackend.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/files_external/lib/Lib/Backend/InvalidBackend.php b/apps/files_external/lib/Lib/Backend/InvalidBackend.php
index c3c5ca0cac7..0d51669b3ca 100644
--- a/apps/files_external/lib/Lib/Backend/InvalidBackend.php
+++ b/apps/files_external/lib/Lib/Backend/InvalidBackend.php
@@ -21,6 +21,10 @@
namespace OCA\Files_External\Lib\Backend;
+use OCA\Files_External\Lib\Storage\InvalidStorage;
+use OCA\Files_External\Lib\StorageConfig;
+use OCP\IUser;
+
/**
* Invalid storage backend representing a backend
* that could not be resolved
@@ -41,8 +45,7 @@ class InvalidBackend extends Backend {
$this
->setIdentifier($invalidId)
->setStorageClass('\OC\Files\Storage\FailedStorage')
- ->setText('Unknown storage backend ' . $invalidId)
- ;
+ ->setText('Unknown storage backend ' . $invalidId);
}
/**
@@ -53,5 +56,9 @@ class InvalidBackend extends Backend {
public function getInvalidId() {
return $this->invalidId;
}
+
+ public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = null) {
+ $storage->setBackendOption('exception', new \Exception('Unknown storage backend ' . $this->invalidId));
+ }
}