when root storage cannot be mounted throw an exception visible to the end user
This commit is contained in:
parent
1374ba9adf
commit
60a8419a1f
|
@ -93,7 +93,12 @@ class Mount {
|
||||||
try {
|
try {
|
||||||
return $this->loader->load($this->mountPoint, $this->class, $this->arguments);
|
return $this->loader->load($this->mountPoint, $this->class, $this->arguments);
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
|
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);
|
\OC_Log::write('core', $exception->getMessage(), \OC_Log::ERROR);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue