How do you know whether you are vomiting due to food poisoning or because you are pregnant?

By other symptoms. . Food poisoning usually has other symptoms associated with it: cramping, diarrhea, possible fever, feeling lightheaded.
Good question. Typically vomiting with pregnancy is episodic, occurring every morning for example. Food poisoning usually starts with severe vomiting but will then go into diarrhea. This is less likely to come and go...More constant. However, the risk of either is dehydration. If you are getting dehydrated it doesn't matter what it is from....You need to see your doctor.