Well, mines don't actually "spit" the foreign matter out, but it more or less just falls out. They usually grab their food with their hands, but in the event they just jump and eat it, additional things get in and they just open their mouths and whatever it is falls out, coated in slime, which I'm guessing is stomach acid.
I didn't realize all frogs didn't do this. We only have 2 types of Anura here so, but that sounds unlucky for a hungry pacman.![]()