From c261c7bc33de38f3ac2fd851e65add5c0d58ae19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petar=20=C5=A0panja?= Date: Thu, 27 Jun 2024 16:13:08 +0200 Subject: [PATCH] NGSTACK-842: catch Throwable when loading Content for update --- bundle/Command/ScheduledVisibilityUpdateCommand.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bundle/Command/ScheduledVisibilityUpdateCommand.php b/bundle/Command/ScheduledVisibilityUpdateCommand.php index d6dd702..35d5074 100644 --- a/bundle/Command/ScheduledVisibilityUpdateCommand.php +++ b/bundle/Command/ScheduledVisibilityUpdateCommand.php @@ -24,6 +24,7 @@ use Symfony\Component\Console\Question\ConfirmationQuestion; use Symfony\Component\Console\Style\SymfonyStyle; +use Throwable; use function count; use function sprintf; @@ -153,12 +154,12 @@ private function processResults(array $results, ProgressBar $progressBar): void [$language->getLanguageCode()], ), ); - } catch (NotFoundException $exception) { + } catch (Throwable $throwable) { $this->logger->error( sprintf( - 'Content with id #%d does not exist: %s', + 'An error occurred when loading Content #%d: %s', $contentId, - $exception->getMessage(), + $throwable->getMessage(), ), );