Yes, throwing up is a possible cause of diaphragm pain. Vomiting puts a lot of pressure on the abdomen, chest, and esophagus, which might trigger both chest and diaphragm pain. Digestive juices might irritate the esophagus, which might also feel like diaphragm pain.