Dogs throw up all the time - if something disagrees with them, when they eat something putrid that they've discovered and consumed, or just when they have a bit of an upset tummy. However, persistent dog stomach problems should be checked by a vet. Any sort of continued vomiting should be checked, but it is even more important when it impacts your dog's quality of life. Your vet can determine whether the stomach problems are truly a digestive problem, or whether it's some other dog health problem.
Persistent vomiting isn't just an unpleasant mess. The loss of fluids can cause your dog to become severely dehydrated, to the point where it becomes a medical emergency. And it's not unreasonable to assume that continued vomiting is upsetting to your dog, too - it doesn't feel good, and could make his stomach and his throat sore as well. Bring your dog to the vet immediately if his vomiting persists, or if he shows other signs of a medical issue, such as staggering or disorientation.
If your dog is vomiting, keep a record of information like:
An accurate record can help your vet to make a preliminary diagnosis, or at least determine whether further testing will be required. Blood work may be recommended as well.
Dog stomach problems aren't uncommon. The occasional vomiting and diarrhea is not usually anything to worry about... but an acute or violent vomiting episode, or persistent vomiting, indicates that a consultation with the vet is in order.