I've never had that happen, thank goodness, but the number of times I've heard pre-barf noises from the top of the cat-tree is amazing. Given that the cat-tree's highest level is about a metre above my desk, and the cat concerned is invariably pointing his/her head in EXACTLY the right direction and angle to projectile vomit a monitor, it tends to result in a high-speed Dragonbird rush to the tree. Where I show all the correct levels of sympathy by grabbing the cat , throwing him/her to ground level and saying "If you're going to throw up, do it on the floor".
It usually works. The cat is so shocked he/she forgets what he was doing and wanders off somewhere else.