Can I exercise if I have a hernia?

Can I exercise if I have a hernia?