I try throw exception when there is no result in database, here is code:
try {
if (!$stmt->execute()) {
throw new ErrorExeption('there is no row with that id');
}
} catch (ErrorExeption $e) {
echo $e->getMessage();
}
So, when I paste wron Id I cant see the error message. What I am doing wrong?