Continue to next file on value errors

pull/823/head
Akhil 2023-09-18 13:55:41 +05:30
parent ebddc4d62e
commit ba12acafe8
No known key found for this signature in database
GPG Key ID: A8AB680DBB7F3D45
1 changed files with 2 additions and 1 deletions

View File

@ -37,6 +37,7 @@ use OCP\ITempManager;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Output\ConsoleSectionOutput; use Symfony\Component\Console\Output\ConsoleSectionOutput;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use ValueError;
class Index class Index
{ {
@ -203,7 +204,7 @@ class Index
$this->timelineWrite->processFile($file); $this->timelineWrite->processFile($file);
} catch (\OCP\Lock\LockedException $e) { } catch (\OCP\Lock\LockedException $e) {
$this->log("Skipping file {$path} due to lock", true); $this->log("Skipping file {$path} due to lock", true);
} catch (\Exception $e) { } catch (\Exception | \ValueError $e) {
$this->error("Failed to index file {$path}: {$e->getMessage()}"); $this->error("Failed to index file {$path}: {$e->getMessage()}");
} finally { } finally {
$this->tempManager->clean(); $this->tempManager->clean();