Skip to content

Commit b672c4e

Browse files
Revert "Catch AfterCommitException from AbstractResource.php"
This reverts commit 1cc3787.
1 parent 7b813c2 commit b672c4e

File tree

16 files changed

+0
-36
lines changed

16 files changed

+0
-36
lines changed

app/code/Magento/Authorization/Model/ResourceModel/Rules.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@ public function saveRel(\Magento\Authorization\Model\Rules $rule)
121121

122122
$connection->commit();
123123
$this->aclDataCache->clean();
124-
} catch (\Magento\Framework\Exception\AfterCommitException $e) {
125-
throw $e->getPrevious();
126124
} catch (\Magento\Framework\Exception\LocalizedException $e) {
127125
$connection->rollBack();
128126
throw $e;

app/code/Magento/Catalog/Console/Command/ProductAttributesCleanUp.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
102102
$output->writeln("<info>Unused product attributes successfully cleaned up:</info>");
103103
$output->writeln("<comment> " . implode("\n ", $attributeTables) . "</comment>");
104104
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
105-
} catch (\Magento\Framework\Exception\AfterCommitException $e) {
106-
throw $e->getPrevious();
107105
} catch (\Exception $exception) {
108106
$this->attributeResource->rollBack();
109107

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,6 @@ public function move($parentId, $afterCategoryId)
429429

430430
// Set data for indexer
431431
$this->setAffectedCategoryIds([$this->getId(), $oldParentId, $parentId]);
432-
} catch (\Magento\Framework\Exception\AfterCommitException $e) {
433-
throw $e->getPrevious();
434432
} catch (\Exception $e) {
435433
$this->_getResource()->rollBack();
436434
throw $e;

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ public function aroundSave(
4444
$result = $proceed($product, $saveOptions);
4545
$this->resourceModel->commit();
4646
return $result;
47-
} catch (\Magento\Framework\Exception\AfterCommitException $e) {
48-
throw $e->getPrevious();
4947
} catch (\Exception $e) {
5048
$this->resourceModel->rollBack();
5149
throw $e;
@@ -71,8 +69,6 @@ public function aroundDelete(
7169
$result = $proceed($product);
7270
$this->resourceModel->commit();
7371
return $result;
74-
} catch (\Magento\Framework\Exception\AfterCommitException $e) {
75-
throw $e->getPrevious();
7672
} catch (\Exception $e) {
7773
$this->resourceModel->rollBack();
7874
throw $e;
@@ -98,8 +94,6 @@ public function aroundDeleteById(
9894
$result = $proceed($productSku);
9995
$this->resourceModel->commit();
10096
return $result;
101-
} catch (\Magento\Framework\Exception\AfterCommitException $e) {
102-
throw $e->getPrevious();
10397
} catch (\Exception $e) {
10498
$this->resourceModel->rollBack();
10599
throw $e;

app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Eav/AbstractEav.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ public function reindexAll()
7777
$this->_removeNotVisibleEntityFromIndex();
7878
$this->syncData();
7979
$this->commit();
80-
} catch (\Magento\Framework\Exception\AfterCommitException $e) {
81-
throw $e->getPrevious();
8280
} catch (\Exception $e) {
8381
$this->rollBack();
8482
throw $e;

app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/DefaultPrice.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,6 @@ public function reindexAll()
167167
try {
168168
$this->reindex();
169169
$this->commit();
170-
} catch (\Magento\Framework\Exception\AfterCommitException $e) {
171-
throw $e->getPrevious();
172170
} catch (\Exception $e) {
173171
$this->rollBack();
174172
throw $e;

app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ public function reindexAll()
119119
try {
120120
$this->_prepareIndexTable();
121121
$this->commit();
122-
} catch (\Magento\Framework\Exception\AfterCommitException $e) {
123-
throw $e->getPrevious();
124122
} catch (\Exception $e) {
125123
$this->rollBack();
126124
throw $e;

app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Plugin/Category.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ private function addCommitCallback(ResourceCategory $resourceCategory, \Closure
4848
}
4949
});
5050
$resourceCategory->commit();
51-
} catch (\Magento\Framework\Exception\AfterCommitException $e) {
52-
throw $e->getPrevious();
5351
} catch (\Exception $e) {
5452
$resourceCategory->rollBack();
5553
throw $e;

app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Plugin/Product.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ private function addCommitCallback(ResourceProduct $productResource, \Closure $p
5353
$this->reindexRow($product->getEntityId());
5454
});
5555
$productResource->commit();
56-
} catch (\Magento\Framework\Exception\AfterCommitException $e) {
57-
throw $e->getPrevious();
5856
} catch (\Exception $e) {
5957
$productResource->rollBack();
6058
throw $e;

app/code/Magento/Customer/Model/Plugin/CustomerRepository/TransactionWrapper.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ public function aroundSave(
4444
$result = $proceed($customer, $passwordHash);
4545
$this->resourceModel->commit();
4646
return $result;
47-
} catch (\Magento\Framework\Exception\AfterCommitException $e) {
48-
throw $e->getPrevious();
4947
} catch (\Exception $e) {
5048
$this->resourceModel->rollBack();
5149
throw $e;

0 commit comments

Comments
 (0)