Proverbs 29:6 in the King James Version
In the transgression of an evil man there is a snare: but the righteous doth sing and rejoice.
Context
5 A man who flatters his neighbor spreads a net for his feet.
6 An evil man is snared by his sin, but the righteous can sing and be glad.
7 The righteous care about justice for the poor. The wicked aren’t concerned about knowledge.