Skip to content

Commit

Permalink
Merge pull request #20 from FATCHIP-GmbH/0057197_fatal_error_fixes
Browse files Browse the repository at this point in the history
0057197: Fixed fatal errors occured
  • Loading branch information
andrefatchip authored Jan 5, 2020
2 parents 9fbbb5f + 2870f9f commit a407938
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Services/Helper/AbstractHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ public function createTax(float $rate)
try {
$this->entityManager->persist($tax);
$this->entityManager->flush();
} catch (OptimisticLockException | ORMException $e) {
} catch (OptimisticLockException $e) {
$this->logger->error('Error saving tax rule', array($rate));
} catch (ORMException $e) {
$this->logger->error('Error saving tax rule', array($rate));
}
}
Expand Down
4 changes: 3 additions & 1 deletion Services/Helper/ShopwareArticleHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ public function fixMissingAttribute(ArticleDetail $detail)
try {
$this->entityManager->persist($detail);
$this->entityManager->flush();
} catch (OptimisticLockException | ORMException $e) {
} catch (OptimisticLockException $e) {
$this->logger->error('Error saving attribute');
} catch (ORMException $e) {
$this->logger->error('Error saving attribute');
}
}
Expand Down
4 changes: 3 additions & 1 deletion Services/Helper/ShopwareOrderHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,9 @@ public function setAfterBuyIds(array $values)

try {
$this->entityManager->flush();
} catch (OptimisticLockException | ORMException $e) {
} catch (OptimisticLockException $e) {
$this->logger->error('Error storing afterbuy ids');
} catch (ORMException $e) {
$this->logger->error('Error storing afterbuy ids');
}
}
Expand Down
5 changes: 4 additions & 1 deletion Services/WriteData/Internal/WriteProductsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ public function send($targetData)
{
try {
$this->entityManager->flush();
} catch (OptimisticLockException | ORMException $e) {
} catch (OptimisticLockException $e) {
$this->logger->error('Error storing products', $targetData);
exit('Error storing products');
} catch (ORMException $e) {
$this->logger->error('Error storing products', $targetData);
exit('Error storing products');
}
Expand Down
3 changes: 2 additions & 1 deletion viaebShopwareAfterbuy.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ public function fixDefaultValueTypes()
]);
}
}
} catch (Zend_Db_Adapter_Exception | Zend_Db_Statement_Exception $e) {
} catch (Zend_Db_Adapter_Exception $e) {
} catch (Zend_Db_Statement_Exception $e) {
}
}

Expand Down

0 comments on commit a407938

Please sign in to comment.