Skip to content

Commit 471ff6a

Browse files
author
Franciszek Wawrzak
committed
improve image uploader error handler
1 parent 5a9fcab commit 471ff6a

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
@@ -221,8 +221,10 @@ public function moveFileFromTmp($imageName, $returnRelativePath = false)
221221
$baseImagePath
222222
);
223223
} catch (\Exception $e) {
224+
$this->logger->critical($e);
224225
throw new \Magento\Framework\Exception\LocalizedException(
225-
__('Something went wrong while saving the file(s).')
226+
__('Something went wrong while saving the file(s).'),
227+
$e
226228
);
227229
}
228230

@@ -276,7 +278,8 @@ public function saveFileToTmpDir($fileId)
276278
} catch (\Exception $e) {
277279
$this->logger->critical($e);
278280
throw new \Magento\Framework\Exception\LocalizedException(
279-
__('Something went wrong while saving the file(s).')
281+
__('Something went wrong while saving the file(s).'),
282+
$e
280283
);
281284
}
282285
}

0 commit comments

Comments
 (0)