Fixed thumbnail generator not catching exceptions
This commit is contained in:
parent
ef98e00b15
commit
766fc05075
1 changed files with 9 additions and 2 deletions
|
@ -16,7 +16,14 @@ $postThumbnailService = Injector::get(PostThumbnailService::class);
|
||||||
|
|
||||||
foreach ($postDao->findAll() as $post)
|
foreach ($postDao->findAll() as $post)
|
||||||
{
|
{
|
||||||
$thumbnailName = $postThumbnailService->generateIfNeeded($post, $size, $size);
|
try
|
||||||
echo '.';
|
{
|
||||||
|
$thumbnailName = $postThumbnailService->generateIfNeeded($post, $size, $size);
|
||||||
|
echo '.';
|
||||||
|
}
|
||||||
|
catch (Exception $e)
|
||||||
|
{
|
||||||
|
echo PHP_EOL . $post->getId() . ': ' . $e->getMessage() . PHP_EOL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
echo PHP_EOL;
|
echo PHP_EOL;
|
||||||
|
|
Loading…
Reference in a new issue