Vomiting undigested food by a dog isn't unusual and is usually a way of expelling something that is not wanted by the body. In such a case, the dog is suffering from indigestion. However, if the dog has thrown up undigested food more than once or twice in the last one week, he may be suffering a stomach infection, so take him to a vet for proper diagnosis. Read on about this from www.vetinfo.com/dog-throwing-up-undigested-food.html#b.
He/she might have liver failure it happened to my dog too and he got put down so take him/her to the vet to get medicine or something. He/ she might be sick as well, so I suggest you take it to the vet ASAP!
has he been chewing rawhide in either shredded form, sticks or whole "bone" knots? these can literally plug the digestive tract when ingested b/c water makes them expand and they won't pass through the gut.lay him on his back and with your finger tips firmly rub his belly right up under his ribs at the sternum to see if you feel any lumpiness inside. if he has a rawhide blockage he will need to see the vet for i.v. hydration and possible excise of the blockage. this can't wait. has he had his shots? distemper produces the same symptoms. i.e.:has he been acting funny, arching his head and neck back or crying incessantly? get a product called nutracal-lots of calories in a dense pastel smells kind of like honey and molasses.but get to the vet!