Been there, yuk! The best thing for you to do is not freak out, or make a big fuss over him when he does it. Handle the situation in a matter-of-fact way, "Oh, you cried so hard you threw up, we'll clean you up once we get home (or wherever your destination is.)"
Seriously, studies have shown that babies as young as 6/7 months know how to cry for wants, not just needs, so the "they're just babies" theory doesn't hold. They are, albeit subconsciously, trying to manipulate their situations. My daughter was a drama queen, and when she didn't get the desired response she was shocked and mad, but after awhile learned that Mama didn't play "control" games : )