merged errors handling from polter-rnd

This commit is contained in:
Pavel Artsishevsky
2022-04-22 21:59:22 +03:00
committed by huangjx
parent 37a3bfdfa1
commit 1cf4f4a00b

View File

@@ -53,8 +53,10 @@ class folderScan
try {
$this->scanner->scan($this->path);
return ['status' => true, 'path' => $this->path];
} catch (ForbiddenException $e) {
} catch (\OCP\Files\ForbiddenException $e) {
$this->logger->warning("Make sure you're running the scan command only as the user the web server runs as");
} catch (\OCP\Files\NotFoundException $e) {
$this->logger->warning("Path for the scan command not found: " . $e->getMessage());
} catch (\Exception $e) {
$this->logger->warning("Exception during scan: " . $e->getMessage() . $e->getTraceAsString());
}