aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/insufficientdataformeaningfulanswerexception.php
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2015-08-12 19:51:09 +0100
committerRobin McCorkell <rmccorkell@owncloud.com>2015-08-19 10:08:23 +0100
commitb6eb952ac61326a15108820b0dd0a1712f00dfdb (patch)
tree73457afc836bfac5a9af9364210e38b5667eea87 /apps/files_external/lib/insufficientdataformeaningfulanswerexception.php
parentc592e24c871f0f6a8d688c5c93e769b1505e4b6d (diff)
downloadnextcloud-server-b6eb952ac61326a15108820b0dd0a1712f00dfdb.tar.gz
nextcloud-server-b6eb952ac61326a15108820b0dd0a1712f00dfdb.zip
Propagate auth mechanism/backend failures to filesystem layer
Failure to prepare the storage during backend or auth mechanism manipulation will throw an InsufficientDataForMeaningfulAnswerException, which is propagated to StorageNotAvailableException in the filesystem layer via the FailedStorage helper class. When a storage is unavailable not due to failure, but due to insufficient data being available, a special 'indeterminate' status is returned to the configuration UI.
Diffstat (limited to 'apps/files_external/lib/insufficientdataformeaningfulanswerexception.php')
-rw-r--r--apps/files_external/lib/insufficientdataformeaningfulanswerexception.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/apps/files_external/lib/insufficientdataformeaningfulanswerexception.php b/apps/files_external/lib/insufficientdataformeaningfulanswerexception.php
new file mode 100644
index 00000000000..dd4cd75df12
--- /dev/null
+++ b/apps/files_external/lib/insufficientdataformeaningfulanswerexception.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * @author Robin McCorkell <rmccorkell@owncloud.com>
+ *
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OCA\Files_External\Lib;
+
+use \OCP\Files\StorageNotAvailableException;
+
+/**
+ * Authentication mechanism or backend has insufficient data
+ */
+class InsufficientDataForMeaningfulAnswerException extends StorageNotAvailableException {
+}