Catch specific exceptions (not the parent IMapperException) in StackMapper::findStackFromCardId()

Signed-off-by: Raul Ferreira Fuentes <raul@nextcloud.com>
This commit is contained in:
Raul Ferreira Fuentes
2022-04-05 17:24:37 +02:00
parent ac5524efdf
commit 575b885a3a

View File

@@ -62,9 +62,10 @@ WHERE c.id = ?
SQL;
try {
return $this->findEntity($sql, [$cardId]);
} catch (IMapperException $e) {
return null;
} catch (MultipleObjectsReturnedException|DoesNotExistException $e) {
}
return null;
}