I use the class PDO
for communication with banco de dados
and I do not know a good way to capture this exceção
.
I searched for a class that extends PDOException
but did not find it.
I can make a query before deleting, this resolves, but I wanted to handle when the exception is thrown, or is that not the best way?