diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-13 17:06:10 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-13 17:10:58 -0400 |
commit | 863d3a43b28df0bfec6aa02bde65073ca4beb926 (patch) | |
tree | 8faadb92f02f0627d5e4e6f443e6cf03995d13f0 /lib | |
parent | 7f12a65c2437033fd890a7995efcc0ec3be37414 (diff) | |
download | nextcloud-server-863d3a43b28df0bfec6aa02bde65073ca4beb926.tar.gz nextcloud-server-863d3a43b28df0bfec6aa02bde65073ca4beb926.zip |
Catch exceptions and write to log when creating storage object fails
Diffstat (limited to 'lib')
-rw-r--r-- | lib/filesystem.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/filesystem.php b/lib/filesystem.php index e9d2ae93372..5af6e0aa54c 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -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; |