From 239b7773c292ee30147a8a7f2be8e8e47b73b3e6 Mon Sep 17 00:00:00 2001 From: thrillfall Date: Wed, 3 Nov 2021 13:46:04 +0100 Subject: [PATCH] abort updates once it fails --- lib/Core/EpisodeAction/EpisodeActionSaver.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/Core/EpisodeAction/EpisodeActionSaver.php b/lib/Core/EpisodeAction/EpisodeActionSaver.php index 1b9a959..9095a7d 100644 --- a/lib/Core/EpisodeAction/EpisodeActionSaver.php +++ b/lib/Core/EpisodeAction/EpisodeActionSaver.php @@ -47,14 +47,10 @@ class EpisodeActionSaver try { $episodeActionEntities[] = $this->episodeActionWriter->save($episodeActionEntity); } catch (UniqueConstraintViolationException $uniqueConstraintViolationException) { - try { $episodeActionEntities[] = $this->updateEpisodeAction($episodeActionEntity, $userId); - } catch (Exception $exception) {} } catch (Exception $exception) { if ($exception->getReason() === Exception::REASON_UNIQUE_CONSTRAINT_VIOLATION) { - try { $episodeActionEntities[] = $this->updateEpisodeAction($episodeActionEntity, $userId); - } catch (Exception $exception) {} } } } @@ -67,9 +63,6 @@ class EpisodeActionSaver ->format("U"); } - /** - * @throws Exception - */ private function updateEpisodeAction( EpisodeActionEntity $episodeActionEntity, string $userId