Skip to content

Commit 207a159

Browse files
committed
Added original exception as the cause to the new exception on product delete error
1 parent 0122d0b commit 207a159

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,8 @@ public function delete(ProductInterface $product)
647647
throw new CouldNotSaveException(__($e->getMessage()));
648648
} catch (\Exception $e) {
649649
throw new \Magento\Framework\Exception\StateException(
650-
__('The "%1" product couldn\'t be removed.', $sku)
650+
__('The "%1" product couldn\'t be removed.', $sku),
651+
$e
651652
);
652653
}
653654
$this->removeProductFromLocalCache($sku);

0 commit comments

Comments
 (0)