]> source.dussan.org Git - nextcloud-server.git/commitdiff
when root storage cannot be mounted throw an exception visible to the end user
authorJörn Friedrich Dreyer <jfd@butonic.de>
Wed, 11 Jun 2014 20:13:27 +0000 (22:13 +0200)
committerJörn Friedrich Dreyer <jfd@butonic.de>
Wed, 18 Jun 2014 10:53:20 +0000 (12:53 +0200)
lib/private/files/mount/mount.php

index 04bccbcab87551f3d3e8ffb0cc869c0b13c580e3..48c9d88c23c1bc5d014dbd3862700127a035287f 100644 (file)
@@ -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 {