The Church's censures are *always* primarily medicinal in nature and are given with the intent of inducing the sinner to repent, censures are not infallible nor are they intended to be an infallible decree that kicks the poor bastard permanently out of the Church and condemn him to hell with no hope at all no matter how obstinate he is - although the excommunicant understands by this judgement of the Church that that will ultimately be their end if they do not repent.
Even as somewhat hedged, the assertion above is still something of an overstatement of the case. Damnation as the ultimate and inevitable consequence can be reasonably assumed only when the excommunication is an effect of an actual mortal sin that is unconfessed and unrepented. An excommunication of the sort mentioned by forlorn—one imposed by a proper authority (
ferendae sententiae), in this instance a pope—is an action in law, not in faith or morals. Thus, if it has been mistakenly or vindictively imposed, it would be blasphemous to suppose that God would second so terrible an injustice.
Even some excommunications incurred automatically (
latae sententiae) should not be regarded as ipso facto indicative of the certain loss of sanctifying grace. After all, John Paul II considered Archbishops Lefebvre and Castro Meyer and the four consecrated bishops excommunicated
latae sententiae after June 1988, but most commenters here at CathInfo surely disagree, as did and do all involved with the consecrations.