Fixed thumbnail generator not catching exceptions

This commit is contained in:
Marcin Kurczewski 2014-10-25 18:48:47 +02:00
parent ef98e00b15
commit 766fc05075

View file

@ -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;