From the Catholic Catechism
ewtn.com/expert/answers/just_war.htm
Paragraphs:
Righteous versus Unrighteous Anger (2302-3)
Anger is a desire for revenge. Anger is the passion (emotion) by which a man reacts to evil, real or apparent, and seeks vindication of his rights, that is, justice. By itself the passion is neither moral or immoral, but becomes so by reason or its being ordered or disordered - that is, reasonable according to the circumstances. An ordered anger is directed to a legitimate object, and, with an appropriate degree of vehemence. An inordinate anger is directed either to an illegitimate object, or, with an unreasonable vehemence. As St. Thomas Aquinas notes, vice may be by defect, as well as excess. So, the presence of evil
should provoke a righteous anger, which if absent constitutes a sinful insensibility.
Consider the just anger of the Lord to the presence in the Temple of the money-changers and the action He took (John 2:13-17). Provoked by this offense against His Father, Jesus formed whips and drove them from the Temple. Righteous anger, and the acts which flow from it, intend the correction of vice (both for the good of the individual sinner and the common good), the restoring of the order of justice disturbed by sin, and the restraint of further evil.
On the other hand, unjust anger seeks to do evil to another for its own sake, the harm to body or soul that it entails. While one may desire, and employ, physical force for the sake of correction, restraint of evil and restoring justice, even if it entails injury and death, one may never desire it for its own sake. To desire some slight injury for an evil motive would be venially sinful. To desire grave injury or death would be gravely sinful. A Christian may never, of course, desire the damnation of the evil doer. Charity requires that we will the good, especially the ultimate good, salvation, for every human being. Unfortunately, the entertainment media often promotes an image of anger and vengeance which is closer to blood lust than to justice.