Horrific Cough

I have had this horrific cough for going on a week now. Everyone I cough really hard I pee a little lol sorry TMI. Once I start it last and last and I can't quit,it has even made me throw up.Has anyone else had a bad cough during pregnancy and if so what did you do?