A: One of my 4 kiddos did that too. Yuck! Your son is doing his best to get your attention -- and he has discovered a pretty potent way to do it. It's a fine line to walk -- you don't want to give him too much reinforcement by paying extra attention to the behavior -- but you can't just let him barf his way to what he wants.
Here's what we used to do: Sit beside the crib to soothe and calm our little guy, while explaining "It's time for night night. Mommy will be right here until you fall asleep." Over a period of weeks, soothing him in his crib -- instead of in the living room -- started to work, as he realized we weren't going to take him out of his room. If he got worked up enough to the point where he was likely to hurl -- we'd pick him up to soothe him in his room, and put him back in the crib when he calmed down. This "broken record" technique eventually worked -- but it did take a few months. Hang in there!