Skip to content

Commit 4bd0bd1

Browse files
committed
fix: Improve error handling
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent bf705a6 commit 4bd0bd1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/BackgroundJobs/ClusterFacesJob.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected function run($argument) {
4040
$userId = (string) $argument['userId'];
4141
try {
4242
$this->clusterAnalyzer->calculateClusters($userId, self::BATCH_SIZE);
43-
} catch (\JsonException|Exception $e) {
43+
} catch (\Throwable $e) {
4444
$this->settingsService->setSetting('clusterFaces.status', 'false');
4545
$this->logger->error('Failed to calculate face clusters', ['exception' => $e]);
4646
}

lib/Classifiers/Images/ImagenetClassifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function classify(array $queueFiles): void {
5757
if (count($landmarkTags) > 0) {
5858
try {
5959
$this->queue->insertIntoQueue(LandmarksClassifier::MODEL_NAME, $queueFile);
60-
} catch (Exception $e) {
60+
} catch (\Throwable $e) {
6161
$this->logger->error('Cannot insert file into queue', ['exception' => $e]);
6262
}
6363
}

0 commit comments

Comments
 (0)