If your dog eats cake that contains raisins or nuts then it can lead to stomach upset. In addition, feeding too much sugar will harm the nervous system, heart, and kidneys of dogs.