以儆效尤

Idiom

 * 1) (to make a public demonstration of punishing a wrongdoer) in order to deter innocents who might mimic the example of the wrongdoer