make an example of

[make an example of] {v. phr.} To punish (someone) publicly to showwhat happens when someone does wrong.

The teacher made an exampleof the boy who copied from another student during a test.

ThePilgrims made an example of a thief by putting him in the stocks.