Skip to content

Commit f6d6cce

Browse files
ENGCOM-7067: improve Magento\Catalog\Model\ImageUploader error handler #27179
- Merge Pull Request #27179 from fsw/magento2:2.4-develop - Merged commits: 1. 471ff6a 2. 3964680 3. ef3cabe
2 parents a66a2d5 + ef3cabe commit f6d6cce

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/code/Magento/Catalog/Model/ImageUploader.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,10 @@ public function moveFileFromTmp($imageName, $returnRelativePath = false)
236236
$storage->put($baseImagePath, $content);
237237

238238
} catch (\Exception $e) {
239+
$this->logger->critical($e);
239240
throw new \Magento\Framework\Exception\LocalizedException(
240-
__('Something went wrong while saving the file(s).')
241+
__('Something went wrong while saving the file(s).'),
242+
$e
241243
);
242244
}
243245

@@ -291,7 +293,8 @@ public function saveFileToTmpDir($fileId)
291293
} catch (\Exception $e) {
292294
$this->logger->critical($e);
293295
throw new \Magento\Framework\Exception\LocalizedException(
294-
__('Something went wrong while saving the file(s).')
296+
__('Something went wrong while saving the file(s).'),
297+
$e
295298
);
296299
}
297300
}

0 commit comments

Comments
 (0)