From a345464d06be37a2d4fa98545ec367e291e4ec38 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Sat, 30 Oct 2021 23:07:50 +0200 Subject: [PATCH] Log actual exception in ResizeJob --- classes/ResizeJob.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/classes/ResizeJob.php b/classes/ResizeJob.php index 3386724..855e99a 100644 --- a/classes/ResizeJob.php +++ b/classes/ResizeJob.php @@ -11,8 +11,13 @@ class ResizeJob public function fire($job, $params) { - list($file) = $params; - app(ImageResizer::class)->generate(new MediaPath($file)); + 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)