The cat could have bladder stones. It causes them to have a hard time passing urine, and it could explain the throwing up as well. Although it could be more than one thing going on. Sometimes, a cat has a hard time processing specific foods.
Any vet would probably order an x-ray at this point and do a urine sample.
I hope your cat feels better.
As to the guy who said to "get a dog." Trust me, they come with their own share of problems.
But pets are family, and it is not wrong nor silly to love them, to take them to the vet, and want to see them feel better.
For those of you making jokes, this is not an appropriate response to someone asking for your help.
Grow up.
Some things you do not joke about.