I still don't think anything could be worse than in the shower at the gym if there aren't stalls. There you are out in the open with nothing to cover it plus you're probably covered in soap so you can't leave until you rinse. You just have to stand there and act like nothings out of the ordinary. I've never had this happen though.
I did pop a woody on a nude beach once. When I felt it coming on I decided to lay down on my stomach and sun my buns.