Skip to content

Commit

Permalink
Merge pull request #21 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 a407938 + 1703bb0 commit aa79882
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Services/Helper/AbstractHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,9 @@ public function createMediaImage($url, $albumName = 'Artikel')
try {
$this->entityManager->persist($media);
$this->entityManager->flush($media);
} catch (OptimisticLockException | ORMException $e) {
} catch (OptimisticLockException $e) {
$this->logger->error($e->getMessage());
} catch (ORMException $e) {
$this->logger->error($e->getMessage());
}

Expand Down
4 changes: 3 additions & 1 deletion Services/Helper/ShopwareArticleHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,9 @@ public function getAssignableConfiguratorOptions(array $variants)
try {
$this->entityManager->persist($option);
$this->entityManager->flush($option);
} catch (OptimisticLockException | ORMException $e) {
} catch (OptimisticLockException $e) {
$this->logger->error('Error assigning configurator options', array(json_encode($option)));
} catch (ORMException $e) {
$this->logger->error('Error assigning configurator options', array(json_encode($option)));
}

Expand Down
4 changes: 3 additions & 1 deletion Services/Helper/ShopwareOrderHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,9 @@ public function createCustomer(ValueOrder $order, ValueAddress $billingAddress,
try {
$this->entityManager->persist($customer);
$this->entityManager->flush();
} catch (OptimisticLockException | ORMException $e) {
} catch (OptimisticLockException $e) {
$this->logger->error('Error writing customer data.');
} catch (ORMException $e) {
$this->logger->error('Error writing customer data.');
}

Expand Down

0 comments on commit aa79882

Please sign in to comment.