Skip to content

Commit

Permalink
NGSTACK-842: catch Throwable when loading Content for update
Browse files Browse the repository at this point in the history
  • Loading branch information
pspanja committed Jun 27, 2024
1 parent 44061d4 commit c261c7b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bundle/Command/ScheduledVisibilityUpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use Symfony\Component\Console\Question\ConfirmationQuestion;
use Symfony\Component\Console\Style\SymfonyStyle;

use Throwable;
use function count;
use function sprintf;

Expand Down Expand Up @@ -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(),
),
);

Expand Down

0 comments on commit c261c7b

Please sign in to comment.