The Tao of TeaChing (Making Mistakes in Front of the Class)
If I catch it quickly and can easily explain the error, I use it as an example of failing up. "Ooops, look at me, here's my mistake, here's how I can learn from it."

If students catch it, and I'm not immediately sure who is right, I make a note to do some research and come back to it in the next class.

If I don't realize it until class is over, I make sure to correct it the next day so that I don't reinforce a misconception.