From 766fc050750adb8c484ada357db51828ce32d481 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sat, 25 Oct 2014 18:48:47 +0200 Subject: [PATCH] Fixed thumbnail generator not catching exceptions --- scripts/thumbnails.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/thumbnails.php b/scripts/thumbnails.php index 849ac92a..e9a47ebc 100644 --- a/scripts/thumbnails.php +++ b/scripts/thumbnails.php @@ -16,7 +16,14 @@ $postThumbnailService = Injector::get(PostThumbnailService::class); foreach ($postDao->findAll() as $post) { - $thumbnailName = $postThumbnailService->generateIfNeeded($post, $size, $size); - echo '.'; + try + { + $thumbnailName = $postThumbnailService->generateIfNeeded($post, $size, $size); + echo '.'; + } + catch (Exception $e) + { + echo PHP_EOL . $post->getId() . ': ' . $e->getMessage() . PHP_EOL; + } } echo PHP_EOL;