Is your baby sick? 
It's normal for them to cough till they vomit. 
If it happens very frequently, do bring him to see a doctor, maybe he require a nebulizer to help open his airways so he would feel and breathe better. 
Hang on there mummy. Its not easy
 Read more
Badass Momma