summaryrefslogtreecommitdiffstats
path: root/apps/files_external/controller/storagescontroller.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/controller/storagescontroller.php')
-rw-r--r--apps/files_external/controller/storagescontroller.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/apps/files_external/controller/storagescontroller.php b/apps/files_external/controller/storagescontroller.php
index f754565f628..048f3588ed7 100644
--- a/apps/files_external/controller/storagescontroller.php
+++ b/apps/files_external/controller/storagescontroller.php
@@ -237,9 +237,21 @@ abstract class StoragesController extends Controller {
)
);
} catch (InsufficientDataForMeaningfulAnswerException $e) {
- $storage->setStatus(\OC_Mount_Config::STATUS_INDETERMINATE);
+ $storage->setStatus(
+ \OC_Mount_Config::STATUS_INDETERMINATE,
+ $this->l10n->t('Insufficient data: %s', [$e->getMessage()])
+ );
} catch (StorageNotAvailableException $e) {
- $storage->setStatus(\OC_Mount_Config::STATUS_ERROR);
+ $storage->setStatus(
+ \OC_Mount_Config::STATUS_ERROR,
+ $e->getMessage()
+ );
+ } catch (\Exception $e) {
+ // FIXME: convert storage exceptions to StorageNotAvailableException
+ $storage->setStatus(
+ \OC_Mount_Config::STATUS_ERROR,
+ get_class($e).': '.$e->getMessage()
+ );
}
}