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