Sex while bladder infection?

Ok so I went to the doctor today and I have a bladder infection. I had sex with my bf in the morning, so I already had my infection. Is it bad for him? can he catch it? The only different thing was that having sex was FUCKING painful for me