Whether an excommunication unjustly pronounced has any effect?

Objections

Objection 1 : It would seem that an excommunication which is pronounced unjustly has no effect at all. Because excommunication deprives a man of the protection and grace of God, which cannot be forfeited unjustly. Therefore excommunication has no effect if it be unjustly pronounced.
Objection 2 : Further, Jerome says (on Mt. 16:19: "I will give to thee the keys"): "It is a pharisaical severity to reckon as really bound or loosed, that which is bound or loosed unjustly." But that severity was proud and erroneous. Therefore an unjust excommunication has no effect.