Log actual exception in ResizeJob

This commit is contained in:
philipp lang 2021-10-30 23:07:50 +02:00
parent 8ad60f6ec5
commit a345464d06
1 changed files with 7 additions and 2 deletions

View File

@ -11,8 +11,13 @@ class ResizeJob
public function fire($job, $params)
{
try {
list($file) = $params;
app(ImageResizer::class)->generate(new MediaPath($file));
} catch (Throwable $e) {
Log::error('Resizing of image failed. Message: "'.$e->getMessage().'" in file "'.$e->getFile().'" on line '.$e->getLine());
throw $e;
}
}
public function failed($data, Throwable $e)