God Punishes Both in Wrath and in Mercy
Although there are some men who are so eminent in righteousness that God speaks to them out of His cloudy pillar, such as “Moses and Aaron among His priests, and Samuel among them that call upon His name,” the latter of whom is much praised for his piety and purity in the Scriptures of truth, from his earliest childhood, in which his mother, to accomplish her vow, placed him in God's temple, and devoted him to the Lord as His servant—yet even of such men it is written, “You, O God, wast propitious unto them, though You punished all their devices.” Now the children of wrath God punishes in anger; whereas it is in mercy that He punishes the children of grace; since “whom He loves He corrects, and scourges every son whom He receives.” However, there are no punishments, no correction, no scourge of God, but what are owing to sin, except in the case of Him who prepared His back for the smiter, in order that He might experience all things in our likeness without sin, in order that He might be the saintly Priest of saints, making intercession even for saints, who with no sacrifice of truth say each one even for himself, “Forgive us our trespasses, even as we also forgive them that trespass against us.” Wherefore even our opponents in this controversy, while they are chaste in their life, and commendable in character, and although they do not hesitate to do that which the Lord enjoined on the rich man, who inquired of Him about the attainment of eternal life, after he had told Him, in answer to His first question, that he had already fully kept every commandment in the law,— that “if he wished to be perfect, he must sell all that he had and give to the poor, and transfer his treasure to heaven;” yet they do not in any one instance venture to say that they are without sin. But this, as we believe, they refrain from saying, with deceitful intent; but if they are lying, in this very act they begin either to augment or commit sin.
Source: Merits and Remission of Sin, and Infant Baptism (New Advent)