Browse Source
set the exception for failedstorage
Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/6196/head
Robin Appelman
8 years ago
committed by
Morris Jobke
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with
9 additions and
2 deletions
-
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)); |
|
|
|
} |
|
|
|
} |
|
|
|
|