diff --git a/classes/ResizeJob.php b/classes/ResizeJob.php index ae9897c..3386724 100644 --- a/classes/ResizeJob.php +++ b/classes/ResizeJob.php @@ -3,6 +3,8 @@ namespace Aweos\Resizer\Classes; use Aweos\Resizer\Lib\MediaPath; +use Log; +use Throwable; class ResizeJob { @@ -12,4 +14,15 @@ class ResizeJob list($file) = $params; app(ImageResizer::class)->generate(new MediaPath($file)); } + + public function failed($data, Throwable $e) + { + Log::error("Resizing of image failed", [ + 'message' => $e->getMessage(), + 'exception' => $e, + 'data' => $data, + ]); + + throw $e; + } }