[Pkg-owncloud-commits] [owncloud] 11/273: when root storage cannot be mounted throw an exception visible to the end user
David Prévot
taffit at moszumanska.debian.org
Fri Jul 4 03:12:52 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 60a8419a1f6472375c28f1c8f727c9f04ecb6b39
Author: Jörn Friedrich Dreyer <jfd at butonic.de>
Date: Wed Jun 11 22:13:27 2014 +0200
when root storage cannot be mounted throw an exception visible to the end user
---
lib/private/files/mount/mount.php | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/private/files/mount/mount.php b/lib/private/files/mount/mount.php
index 04bccbc..48c9d88 100644
--- a/lib/private/files/mount/mount.php
+++ b/lib/private/files/mount/mount.php
@@ -93,7 +93,12 @@ class Mount {
try {
return $this->loader->load($this->mountPoint, $this->class, $this->arguments);
} catch (\Exception $exception) {
- \OC_Log::write('core', $exception->getMessage(), \OC_Log::ERROR);
+ if ($this->mountPoint === '/') {
+ // the root storage could not be initialized, show the user!
+ throw new \Exception('The root storage could not be initialized. Please contact your local administrator.', $exception->getCode(), $exception);
+ } else {
+ \OC_Log::write('core', $exception->getMessage(), \OC_Log::ERROR);
+ }
return null;
}
} else {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list