We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 58cd676 + 3691214 commit 9c31b5eCopy full SHA for 9c31b5e
app/code/Magento/Catalog/Model/ProductRepository.php
@@ -644,10 +644,11 @@ public function delete(ProductInterface $product)
644
unset($this->instancesById[$product->getId()]);
645
$this->resourceModel->delete($product);
646
} catch (ValidatorException $e) {
647
- throw new CouldNotSaveException(__($e->getMessage()));
+ throw new CouldNotSaveException(__($e->getMessage()), $e);
648
} catch (\Exception $e) {
649
throw new \Magento\Framework\Exception\StateException(
650
- __('The "%1" product couldn\'t be removed.', $sku)
+ __('The "%1" product couldn\'t be removed.', $sku),
651
+ $e
652
);
653
}
654
$this->removeProductFromLocalCache($sku);
0 commit comments