Skip to content
Snippets Groups Projects
Commit 863d3a43 authored by Michael Gapczynski's avatar Michael Gapczynski
Browse files

Catch exceptions and write to log when creating storage object fails

parent 7f12a65c
Branches
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment