I always bring food. Something that keeps for a long time and is kind to my stomach. Usually a sandwich of some sort. Delays, cancellations and similar have left me with a sandwich and a granola bar in my backpack in an airport where everything has closed for the night. It's still unpleasant. But it's better than unpleasant with a side of hunger.
And any time I visit a new country, the first thing I do -- often before leaving the airport -- is acquire local yogurt and eat it immediately. It's got to be local. It has to have active cultures. And if I can't find one in the airport, I'll make sure I find some sort of market which can take care of this. And then I won't eat anything more complex than bread for at least a few hours while the new microbes work their way through.
In this case -- spoiled food -- all the yogurt in the world wouldn't have made a difference. But bringing a sub sandwich (or Detroit pizza, or really anything at all) would have.
Spoiled food typically tastes very metallic and/or sour. Sometimes overly bitter. I probably would have spit it out, and hopefully informed an attendant. Doubt it would do any good though. Identifying bad food before swallowing is a skill only the developing world seems to keep. I don't have a perfect track record with this. But it has saved me from "riding the thunderbucket."