Merge pull request #15606 from nextcloud/fix/15605/add-catch-for-runtime-exception
Add catch for RuntimeException
This commit is contained in:
commit
d0e1bcc1d0
|
@ -29,6 +29,7 @@ use OCP\IConfig;
|
||||||
use OCP\ILogger;
|
use OCP\ILogger;
|
||||||
use OCP\Migration\IOutput;
|
use OCP\Migration\IOutput;
|
||||||
use OCP\Migration\IRepairStep;
|
use OCP\Migration\IRepairStep;
|
||||||
|
use RuntimeException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CleanupCardDAVPhotoCache
|
* Class CleanupCardDAVPhotoCache
|
||||||
|
@ -65,6 +66,9 @@ class CleanupCardDAVPhotoCache implements IRepairStep {
|
||||||
$folders = $this->appData->getDirectoryListing();
|
$folders = $this->appData->getDirectoryListing();
|
||||||
} catch (NotFoundException $e) {
|
} catch (NotFoundException $e) {
|
||||||
return;
|
return;
|
||||||
|
} catch (RuntimeException $e) {
|
||||||
|
$this->logger->logException($e, ['message' => 'Failed to fetch directory listing in CleanupCardDAVPhotoCache']);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$folders = array_filter($folders, function (ISimpleFolder $folder) {
|
$folders = array_filter($folders, function (ISimpleFolder $folder) {
|
||||||
|
|
Loading…
Reference in New Issue