If I can go and get away with not talking to anyone, I'm ok. If it's something really social with lots of people that I CAN get out of, I'm usually pretty frank and say "it's too loud and there will be too many people, I'll hate every second" People usually accept this.
If it is something I can't get out of, or shouldn'nt opt out of, I mitigate as much as I can. For instance last week the school my daughter is attending for kindergarten had open house. I couldn't really opt out, I needed to talk to her teacher and give the letter requesting an IEP to the school nurse (my daughter has aspergers). So what I did was show up 15 minutes early. Go "oh, what you are still setting up? Oh I don't care, the teacher and nurse are here, right?" So I got in, talked to the teacher, gave the letter to the nurse and got out just as it was getting crowded. As it was I had issues on the way out. I was really mean to the lady trying to sell spirit wear, she got between me and the exit!
My husband gets it. There have been times I decided, last second, I didn't want to go to a party or whatever and he has always accepted it and not gotten mad over it. Hes a good guy.