diff --git a/src/Processor.php b/src/Processor.php index 72938ad..86a6793 100644 --- a/src/Processor.php +++ b/src/Processor.php @@ -64,6 +64,7 @@ public function __construct( * @param FilesystemAdapter $filesystemAdapter * * @return string + * @throws \Exception */ public function upload($context, $file, $extension, FilesystemAdapter $filesystemAdapter) { @@ -71,7 +72,11 @@ public function upload($context, $file, $extension, FilesystemAdapter $filesyste $fileName = $this->fileManager->setFileSystemAdapter($filesystemAdapter) ->uploadFile($file, $extension, $context); - $this->processSizes($file, $fileName, $context, $extension, $filesystemAdapter); + try { + $this->processSizes($file, $fileName, $context, $extension, $filesystemAdapter); + } catch (\Exception $e) { + throw $e; + } return $fileName; }