mirror of
https://github.com/nextcloud/server.git
synced 2025-10-26 19:21:34 +00:00
Catch exceptions and write to log when creating storage object fails
This commit is contained in:
parent
7f12a65c24
commit
863d3a43b2
@ -273,7 +273,12 @@ class OC_Filesystem{
|
||||
*/
|
||||
static private function createStorage($class,$arguments){
|
||||
if(class_exists($class)){
|
||||
return new $class($arguments);
|
||||
try {
|
||||
return new $class($arguments);
|
||||
} catch (Exception $exception) {
|
||||
OC_Log::write('core', $exception->getMessage(), OC_Log::ERROR);
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
OC_Log::write('core','storage backend '.$class.' not found',OC_Log::ERROR);
|
||||
return false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user