narrow catch to nextcloud dbal exceptions

This commit is contained in:
thrillfall 2021-08-22 21:59:45 +02:00
parent 06f1a9a978
commit 83c18ad623

View File

@ -70,7 +70,7 @@ class EpisodeActionController extends Controller {
return $this->episodeActionWriter->save($episodeActionEntity); return $this->episodeActionWriter->save($episodeActionEntity);
} catch (UniqueConstraintViolationException $uniqueConstraintViolationException) { } catch (UniqueConstraintViolationException $uniqueConstraintViolationException) {
return $this->updateEpisodeAction($episodeAction, $episodeActionEntity); return $this->updateEpisodeAction($episodeAction, $episodeActionEntity);
} catch (\Exception $exception) { } catch (Exception $exception) {
if ($exception->getReason() === Exception::REASON_UNIQUE_CONSTRAINT_VIOLATION) { if ($exception->getReason() === Exception::REASON_UNIQUE_CONSTRAINT_VIOLATION) {
return $this->updateEpisodeAction($episodeAction, $episodeActionEntity); return $this->updateEpisodeAction($episodeAction, $episodeActionEntity);
} }